Opened at 2012-04-05T01:07:09Z
Closed at 2013-06-27T01:44:29Z
#1707 closed defect (fixed)
iputil cannot get local IP addresses on newer Dragonfly BSD (sys.platform == "dragonfly2")
Reported by: | phma | Owned by: | davidsarah |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.1 |
Component: | code | Version: | 1.9.1 |
Keywords: | iputil dragonfly bsd | Cc: | |
Launchpad Bug: |
Description (last modified by zooko)
Here is the log:
2012-04-04 20:35:05-0400 [-] Log opened. 2012-04-04 20:35:05-0400 [-] twistd 10.1.0 (/usr/pkg/bin/python2.6 2.6.7) starting up. 2012-04-04 20:35:05-0400 [-] reactor class: twisted.internet.selectreactor.SelectReactor. 2012-04-04 20:35:05-0400 [-] foolscap.pb.Listener starting on 14159 2012-04-04 20:35:05-0400 [-] nevow.appserver.NevowSite starting on 3456 2012-04-04 20:35:05-0400 [-] Starting factory <nevow.appserver.NevowSite instance at 0x2aade40c> 2012-04-04 20:35:05-0400 [-] My pid: 20180 2012-04-04 20:35:05-0400 [-] twisted.internet.protocol.DatagramProtocol starting on 1889 2012-04-04 20:35:05-0400 [-] Starting protocol <twisted.internet.protocol.DatagramProtocol instance at 0x2aade98c> 2012-04-04 20:35:05-0400 [-] (Port 1889 Closed) 2012-04-04 20:35:05-0400 [-] Stopping protocol <twisted.internet.protocol.DatagramProtocol instance at 0x2aade98c> 2012-04-04 20:35:05-0400 [-] Unhandled Error Traceback (most recent call last): File "/usr/pkg/lib/python2.6/threading.py", line 504, in __bootstrap self.__bootstrap_inner() File "/usr/pkg/lib/python2.6/threading.py", line 532, in __bootstrap_inner self.run() File "/usr/pkg/lib/python2.6/threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) --- <exception caught here> --- File "/usr/pkg/lib/python2.6/site-packages/twisted/python/threadpool.py", line 207, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/pkg/lib/python2.6/site-packages/twisted/python/context.py", line 59, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/pkg/lib/python2.6/site-packages/twisted/python/context.py", line 37, in callWithContext return func(*args,**kw) File "/usr/pkg/lib/python2.6/site-packages/allmydata/util/iputil.py", line 213, in _synchronously_find_addresses_via_config raise UnsupportedPlatformError(sys.platform) allmydata.util.iputil.UnsupportedPlatformError: dragonfly2 2012-04-04 20:35:05-0400 [-] Node._startService failed, aborting 2012-04-04 20:35:05-0400 [-] [Failure instance: Traceback: <class 'allmydata.util.iputil.UnsupportedPlatformError'>: dragonfly2 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/threading.py:504:__bootstrap 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/threading.py:532:__bootstrap_inner 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/threading.py:484:run 2012-04-04 20:35:05-0400 [-] --- <exception caught here> --- 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/site-packages/twisted/python/threadpool.py:207:_worker 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/site-packages/twisted/python/context.py:59:callWithContext 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/site-packages/twisted/python/context.py:37:callWithContext 2012-04-04 20:35:05-0400 [-] /usr/pkg/lib/python2.6/site-packages/allmydata/util/iputil.py:213:_synchronously_find_addresses_via_config 2012-04-04 20:35:05-0400 [-] ] 2012-04-04 20:35:05-0400 [-] calling os.abort() 2012-04-04 20:35:05-0400 [-] calling os.abort()
Here's the client section of tahoe.cfg:
# Which services should this client connect to? introducer.furl = pb://tin57bdenwkigkujmh6rwgztcoh7ya7t@pubgrid.tahoe-lafs.org:50528/introducer helper.furl = #key_generator.furl = stats_gatherer.furl = pb://cmmth6b3lsj2orir3u5yqwwae7xfmxxq@pubgrid.tahoe-lafs.org:51424/jdoyd3kke4zqkmmvlhveb57xsw623kh5
Change History (8)
comment:1 Changed at 2012-11-22T01:19:13Z by davidsarah
- Component changed from unknown to code
- Keywords iputil dragonfly bsd added
- Milestone changed from undecided to soon
- Owner changed from nobody to davidsarah
- Status changed from new to assigned
- Summary changed from tahoe crashed on starting when connecting to the testgrid to iputil cannot get local IP addresses on newer Dragonfly BSD (sys.platform == "dragonfly2")
comment:2 Changed at 2012-11-22T01:22:21Z by davidsarah
comment:3 Changed at 2013-05-27T17:02:49Z by zooko
- Description modified (diff)
comment:4 Changed at 2013-05-27T17:29:22Z by zooko
See #1988
comment:5 Changed at 2013-06-09T01:47:30Z by phma
I added this line to _platform_map in iputil.py and it works:
"dragonfly3": "bsd",
The problem with this is that, when DragonFly 4 comes out, it will break. The OS recognition should be done by prefix substring matching instead. Any OS name that begins with "openbsd" or "netbsd" or "freebsd" or "dragonfly" is a BSD, regardless of the version number.
comment:6 Changed at 2013-06-13T07:41:16Z by zooko
Here's a list of all tickets about "iputil":
https://tahoe-lafs.org/trac/tahoe-lafs/query?status=!closed&keywords=~iputil
Hm, we need to open a new ticket for Daira's suggestion from #1918, to try invoking ifconfig (and then maybe route.exe?) regardless of platform.
comment:7 Changed at 2013-06-25T18:15:57Z by Daira Hopwood <david-sarah@…>
comment:8 Changed at 2013-06-27T01:44:29Z by daira
- Milestone changed from soon to 1.11.0
- Resolution set to fixed
- Status changed from assigned to closed
iputil on trunk no longer distinguishes between Unix variants, which fixes this bug.
iputil is too pessimistic about whether common Unixish commands to get IP addresses will work on some random Unix. There are several command variants, but not many. It should just try all the possibilities in some sensible order.