Custom Query (894 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (103 - 105 of 894)

Ticket Owner Reporter Resolution Summary
#147 desai dclark fixed bcfg2-server fails under Python 2.5
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
#148 desai [email protected] fixed bcfg2 fails to build config if Base/ directory is empty
Description

I've enabled the Base Plugin as structure in my bcfg2.conf file.

My Base/ directory in the repository is empty.

$ bcfg2-info
...
> build myhostname config.txt
error in GetStructures
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 300, in BuildConfiguration
    structures = self.GetStructures(meta)
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 263, in GetStructures
    [struct.BuildStructures(metadata) for struct in self.structures])
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/Base.py", line 29, in BuildStructures
    [base.Match(metadata) for base in self.entries.values()])
TypeError: reduce() of empty sequence with no initial value

After creating an empty file Base/test.xml bcfg2-info is able to produce a config file for the specified host.

#158 desai [email protected] fixed TCheetah: TemplateFile should only accept template files
Description

When FAM processes first the info file from the /Cheetah dir instead of the template file for a ConfigEntry?, the name argument of the TemplateFile? gets initialized with the epath ".../info" and line 29 won't work anymore since it assumes the name to end on '.../template' (self.name[:-8] in the code).

for line in open(self.name[:-8] + '/info').readlines():

Possible Fix:

Index: TCheetah.py
===================================================================
--- TCheetah.py (Revision 2330)
+++ TCheetah.py (Arbeitskopie)
@@ -97,7 +97,7 @@
         if action in ['exists', 'created']:
             if posixpath.isdir(epath):
                 self.AddDirectoryMonitor(epath[len(self.data):])
-            else:
+            elif event.filename == 'template':
                 if not self.entries.has_key(identifier):
                     self.entries[identifier] = TemplateFile(epath, self.properties)
                     self.Entries['ConfigFile'][identifier] = self.BuildEntry
Note: See TracQuery for help on using queries.