Opened at 2013-02-11T22:02:03Z
Last modified at 2013-06-27T01:50:21Z
#1918 closed defect
iputil: finding IP addresses fails on kfreebsd — at Version 4
Reported by: | davidsarah | Owned by: | davidsarah |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.1 |
Component: | code-network | Version: | 1.9.2 |
Keywords: | iputil kfreebsd | Cc: | |
Launchpad Bug: |
Description (last modified by zooko)
From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700239:
tahoe start fails on kfreebsd:
NevowSite starting on 3456 Starting factory <nevow.appserver.NevowSite instance at 0x1a62fc8> My pid: 29925 DatagramProtocol starting on 55322 Starting protocol <twisted.internet.protocol.DatagramProtocol instance at 0x1a73248> Unhandled Error #011Traceback (most recent call last): #011 File "/usr/lib/python2.7/threading.py", line 525, in __bootstrap #011 self.__bootstrap_inner() #011 File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner #011 self.run() #011 File "/usr/lib/python2.7/threading.py", line 505, in run #011 self.__target(*self.__args, **self.__kwargs) <exception caught here> --- #011 File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 207, in _worker #011 result = context.call(ctx, function, *args, **kwargs) #011 File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext #011 return self.currentContext().callWithContext(ctx, func, *args, **kw) #011 File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext #011 return func(*args,**kw) #011 File "/usr/lib/python2.7/dist-packages/allmydata/util/iputil.py", line 214, in _synchronously_find_addresses_via_config #011 raise UnsupportedPlatformError(sys.platform) #011allmydata.util.iputil.UnsupportedPlatformError: gnukfreebsd8 Node._startService failed, aborting [Failure instance: Traceback: <class 'allmydata.util.iputil.UnsupportedPlatformError'>: gnukfreebsd8 /usr/lib/python2.7/threading.py:525:__bootstrap /usr/lib/python2.7/threading.py:552:__bootstrap_inner /usr/lib/python2.7/threading.py:505:run <exception caught here> --- /usr/lib/python2.7/dist-packages/twisted/python/threadpool.py:207:_worker /usr/lib/python2.7/dist-packages/twisted/python/context.py:118:callWithContext /usr/lib/python2.7/dist-packages/twisted/python/context.py:81:callWithContext /usr/lib/python2.7/dist-packages/allmydata/util/iputil.py:214:_synchronously_find_addresses_via_config ] calling os.abort() calling os.abort()
The following patch fixes the issue:
--- tahoe-lafs-1.9.2.orig/src/allmydata/util/iputil.py +++ tahoe-lafs-1.9.2/src/allmydata/util/iputil.py @@ -161,6 +161,7 @@ "netbsd4": "bsd", "netbsd5": "bsd", "netbsd6": "bsd", + "gnukfreebsd8": "bsd", "sunos5": "sunos", "cygwin": "cygwin", }
Change History (4)
comment:1 Changed at 2013-02-11T22:02:36Z by davidsarah
- Description modified (diff)
- Status changed from new to assigned
comment:2 follow-up: ↓ 3 Changed at 2013-02-11T22:07:48Z by davidsarah
comment:3 in reply to: ↑ 2 Changed at 2013-02-13T19:16:02Z by zooko
Replying to davidsarah:
We're far too picky about recognizing the operating system in order to decide which command to use to find IP addresses. In practice, we could just try a couple of common syntaxes that would work for all Unices that are currently supported, and be very likely to work for others. Then we'd only need to distinguish between Windows and everything else.
That sounds like a reasonable approach, davidsarah. On the other hand, it feels kind of icky to be attempting to execute programs on every computer which aren't even part of that operating system. I used to have some code to do that sort of thing in Tahoe-LAFS and Brian pushed back on it.
I guess I'm +0 on it, now.
I mean, the current situation is that Tahoe-LAFS fails to start up on a new operating system until someone adds a 1-line patch like this one. Maybe that's okay for now?
We're far too picky about recognizing the operating system in order to decide which command to use to find IP addresses. In practice, we could just try a couple of common syntaxes that would work for all Unices that are currently supported, and be very likely to work for others. Then we'd only need to distinguish between Windows and everything else.