﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
2930	"""AUTO"" Tub location detection/assignment is silently broken when system tools are missing"	exarkun		"`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`)."	defect	new	normal	undecided	unknown	1.12.1				
