Modify

Ticket #147 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

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

diff (770 bytes) - added by desai 14 years ago.

Change History

comment:1 Changed 14 years ago by anonymous

  • Milestone set to Bcfg2 0.8.5 Release

comment:2 Changed 14 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 14 years ago by dclark

  • Summary changed from bcfg2-server fails under Python 2.5 (SimpleXMLRPCDispatcher change) to bcfg2-server fails under Python 2.5

Changed 14 years ago by desai

comment:4 Changed 14 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 14 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 14 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.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.