#3480 new defect

The introducer writes a garbage fURL if created/started without a "good" environment

Reported by: exarkun Owned by:
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

[exarkun@baryon:/tmp/demo]$ ~/VirtualEnvs/tahoe-lafs/bin/tahoe create-introducer --listen=tcp --hostname=localhost introducer
Introducer created in '/tmp/demo/introducer'
(tahoe-lafs)
[exarkun@baryon:/tmp/demo]$ cat introducer/tahoe.cfg
# -*- mode: conf; coding: utf-8 -*-

# This file controls the configuration of the Tahoe node that
# lives in this directory. It is only read at node startup.
# For details about the keys that can be set here, please
# read the 'docs/configuration.rst' file that came with your
# Tahoe installation.


[node]
nickname =
reveal-IP-address = true
web.port =
web.static = public_html

#log_gatherer.furl =
#timeout.keepalive =
#timeout.disconnect =
#ssh.port = 8022
#ssh.authorized_keys_file = ~/.ssh/authorized_keys
(tahoe-lafs)
[exarkun@baryon:/tmp/demo]$ PATH= ~/VirtualEnvs/tahoe-lafs/bin/tahoe run introducer/
'tahoe run' in '/tmp/demo/introducer'
running node in '/tmp/demo/introducer'
2020-10-16T11:19:24-0400 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 20.3.0 (/home/exarkun/VirtualEnvs/tahoe-lafs/bin/python2.7 2.7.17) starting up.
2020-10-16T11:19:24-0400 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
2020-10-16T11:19:25-0400 [-] Foolscap logging initialized
2020-10-16T11:19:25-0400 [-] Note to developers: twistd.log does not receive very much.
2020-10-16T11:19:25-0400 [-] Use 'flogtool tail -c NODEDIR/private/logport.furl' instead
2020-10-16T11:19:25-0400 [-] and read docs/logging.rst
2020-10-16T11:19:25-0400 [-] My pid: 31023
2020-10-16T11:19:25-0400 [-] Listener starting on 44729
2020-10-16T11:19:25-0400 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fbaf7d8a510 on CleanupEndpoint(_wrapped=<twisted.internet.endpoints.AdoptedStreamServerEndpoint object at 0x7fbaf7d8ac10>, _fd=7, _listened=True) with tub m3krismjjaeb5akzrdb64bqkjajdgh
e6>
2020-10-16T11:19:25-0400 [-] Listener starting on 38895
2020-10-16T11:19:25-0400 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fbaf7b58690 on <twisted.internet.endpoints.TCP4ServerEndpoint object at 0x7fbaf7b583d0> with tub e3gm4ibpvwaeqtetgygu3rwqdywdjc4o>                                                      
2020-10-16T11:19:25-0400 [-] Listener starting on 55485
2020-10-16T11:19:25-0400 [foolscap.pb.Listener#info] Starting factory <Listener at 0x7fbaf7df4450 on CleanupEndpoint(_wrapped=<twisted.internet.endpoints.AdoptedStreamServerEndpoint object at 0x7fbaf7df4e10>, _fd=6, _listened=True) with tub nnh6obbkhulamphdc75p4ex3ogs24e
6z>
2020-10-16T11:19:25-0400 [-] introducer running
^C2020-10-16T11:19:26-0400 [-] Received SIGINT, shutting down.
2020-10-16T11:19:26-0400 [-] (TCP Port 55485 Closed)
2020-10-16T11:19:26-0400 [foolscap.pb.Listener#info] Stopping factory <Listener at 0x7fbaf7df4450 on CleanupEndpoint(_wrapped=<twisted.internet.endpoints.AdoptedStreamServerEndpoint object at 0x7fbaf7df4e10>, _fd=6, _listened=True) with tub nnh6obbkhulamphdc75p4ex3ogs24e
6z>
2020-10-16T11:19:26-0400 [-] (TCP Port 38895 Closed)
2020-10-16T11:19:26-0400 [foolscap.pb.Listener#info] Stopping factory <Listener at 0x7fbaf7b58690 on <twisted.internet.endpoints.TCP4ServerEndpoint object at 0x7fbaf7b583d0> with tub e3gm4ibpvwaeqtetgygu3rwqdywdjc4o>                                                      
2020-10-16T11:19:26-0400 [-] (TCP Port 44729 Closed)
2020-10-16T11:19:26-0400 [foolscap.pb.Listener#info] Stopping factory <Listener at 0x7fbaf7d8a510 on CleanupEndpoint(_wrapped=<twisted.internet.endpoints.AdoptedStreamServerEndpoint object at 0x7fbaf7d8ac10>, _fd=7, _listened=True) with tub m3krismjjaeb5akzrdb64bqkjajdgh
e6>
2020-10-16T11:19:26-0400 [-] Main loop terminated.
2020-10-16T11:19:26-0400 [twisted.scripts._twistd_unix.UnixAppLogger#info] Server Shut Down.

(tahoe-lafs)
[exarkun@baryon:/tmp/demo]$ cat introducer/private/introducer.furl
pb://e3gm4ibpvwaeqtetgygu3rwqdywdjc4o@/vhnnhwhbp56onhpdekef2l7igia4hbib

The introducer server has support code for dealing with tub.location being missing. However, this code generates garbage fURLs if neither ip nor ifconfig can be found. As a bonus, $PATH is not searched for these tools - just a hard-coded list of common locations.

Change History (0)

Note: See TracTickets for help on using tickets.