[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2930: "AUTO" Tub location detection/assignment is silently broken when system tools are missing
Tahoe-LAFS
trac at tahoe-lafs.org
Thu Jun 14 14:02:18 UTC 2018
#2930: "AUTO" Tub location detection/assignment is silently broken when system
tools are missing
---------------------+---------------------------
Reporter: exarkun | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: unknown | Version: 1.12.1
Keywords: | Launchpad Bug:
---------------------+---------------------------
`Node.get_tub_portlocation` attempts to automatically allocate and detect
a listening address for the Tub if none has been explicitly configured.
In this case, it uses `allmydata.util.iputil.get_local_addresses_sync`.
`get_local_addresses_sync` may return an empty list if neither `ip` nor
`ifconfig` can be found or if both of these tools return only errors or
only empty address lists. If an empty address list is returned,
`get_tub_portlocation` nevertheless proceeds to construct a fURL for the
Tub which contains no location hints. Such a fURL is arguably useless
since no piece of Tahoe-LAFS-related software will be able to use it to
establish a connection.
`get_local_addresses_sync` could be made more robust (and probably simpler
and faster, too) by using something like the `netifaces` package.
`get_tub_portlocation` could be made less surprising by failing loudly and
immediately if asked to allocate/detect an address and then discovering it
is unable to (ie, getting an empty local addresses list) rather than
quietly writing garbage to a configuration file for someone to later trip
over (it took me multiple hours to trace the misbehavior from the place
where the problem was observed and reported back to
`get_local_addresses_sync` and `get_tub_portlocation`).
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2930>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list