Ticket #147 (closed defect: fixed)
bcfg2-server fails under Python 2.5
Reported by: | dclark | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | bcfg2-server | Version: | |
Keywords: | Cc: |
Description
Under Python 2.5 (final), bcfg2-server fails for me with:
/usr/local/etc/bcfg2.key Failed to setup server; probably a key problem Traceback (most recent call last): File "/usr/local/bin/bcfg2-server", line 217, in <module> BSERV = Bcfg2Serv(SSETUP) File "/usr/local/bin/bcfg2-server", line 71, in __init__ Bcfg2.Server.Component.Component.__init__(self, setup) File "/usr/local/encap/bcfg2-0.8.5/lib/bcfg2/lib/python2.5/site-packages/Bcfg2/Server/Component.py", line 140, in __init__ SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__(self) TypeError: __init__() takes exactly 3 arguments (1 given) Traceback (most recent call last): File "/usr/local/bin/bcfg2-server", line 219, in <module> critical_error("Failed to setup server; probably a key problem") File "/usr/local/bin/bcfg2-server", line 60, in critical_error raise Fault, (7, "Critical unexpected failure: %s" % (operation)) xmlrpclib.Fault: <Fault 7: 'Critical unexpected failure: Failed to setup server; probably a key problem'>
The culprit looks like a change from Python 2.4 to 2.5:
Python 2.4:
class SimpleXMLRPCDispatcher: """Mix-in class that dispatches XML-RPC requests. This class is used to register XML-RPC method handlers and then to dispatch them. There should never be any reason to instantiate this class directly. """ def __init__(self): self.funcs = {} self.instance = None
Python 2.5:
class SimpleXMLRPCDispatcher: """Mix-in class that dispatches XML-RPC requests. This class is used to register XML-RPC method handlers and then to dispatch them. There should never be any reason to instantiate this class directly. """ def __init__(self, allow_none, encoding): self.funcs = {} self.instance = None self.allow_none = allow_none self.encoding = encoding
Attachments
Change History
comment:2 Changed 17 years ago by dclark
Applied desai's simple workaround patch (manually) from the mailing list about half an hour ago, now getting:
/usr/local/etc/bcfg2.key Bound to port 6 Failed to setup server; probably a key problem Traceback (most recent call last): File "/usr/local/bin/bcfg2-server", line 217, in <module> BSERV = Bcfg2Serv(SSETUP) File "/usr/local/bin/bcfg2-server", line 71, in __init__ Bcfg2.Server.Component.Component.__init__(self, setup) File "/usr/local/lib/bcfg2/lib/python2.5/site-packages/Bcfg2/Server/Component.py", line 148, in __init__ self.funcs.update({'HandleEvents':self.HandleEvents, AttributeError: Bcfg2Serv instance has no attribute 'funcs' Traceback (most recent call last): File "/usr/local/bin/bcfg2-server", line 219, in <module> critical_error("Failed to setup server; probably a key problem") File "/usr/local/bin/bcfg2-server", line 60, in critical_error raise Fault, (7, "Critical unexpected failure: %s" % (operation)) xmlrpclib.Fault: <Fault 7: 'Critical unexpected failure: Failed to setup server; probably a key problem'>
comment:3 Changed 17 years ago by dclark
- Summary changed from bcfg2-server fails under Python 2.5 (SimpleXMLRPCDispatcher change) to bcfg2-server fails under Python 2.5
comment:4 Changed 17 years ago by dclark
- Priority changed from major to minor
- Milestone Bcfg2 0.8.5 Release deleted
lxml doesn't support python 2.5 until very recent releases (1.1beta+). Since lxml 1.1beta+ is not yet included in any of the GNU/Linux distributions, putting this on hold until it is, since it only effects the EncapPackages, and that can be worked around / doesn't effect many people.
comment:5 Changed 17 years ago by dclark
[17:21] <desai> i still get the errors with [lxml] 1.1.1 [17:21] <desai> i will talk to the lxml folks
comment:6 Changed 17 years ago by desai
- Status changed from new to closed
- Resolution set to fixed
OK. With lxml-1.1.1, built with the proper version of pyrex, the server side errors go away and it works properly. It does appear there is a bug in the version of python-apt included with ubuntu-edgy that causes python to segv, so this blocks the client on edgy systems. There do not appear to be any code issues in bcfg2 that are causing a problem any more, so I am resolving this.