Custom Query (894 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (196 - 198 of 894)

Ticket Owner Reporter Resolution Summary
#447 desai [email protected] fixed bcfg2-admin: guess path to ssl key file
Description

In general it would be useful to set the path of the key file to be the dirname of the bcfg2.conf file (e.g. when using -C /home/user/tmp/bcfg2/bcfg2.conf) instead of the hardcoded path /etc/bcfg2.key which is not useful under FreeBSD, ... .

Suggestion:

Index: bcfg2-admin
===================================================================
--- bcfg2-admin (revision 3217)
+++ bcfg2-admin (working copy)
@@ -34,7 +34,7 @@
 [communication]
 protocol = xmlrpc/ssl
 password = %s
-key = /etc/bcfg2.key
+key = %s/bcfg2.key

 [components]
 bcfg2 = %s
@@ -92,13 +92,16 @@
     if uri == '':
         uri = server

-    open(cfile,"w").write(config % ( repo, password, uri ))
+    #guess path of ssl key file
+    keypath = os.path.dirname(os.path.abspath(cfile))

+    open(cfile,"w").write(config % ( repo, password, keypath, uri ))
+
     #generate the ssl key
     print "Now we will generate the ssl key used for secure communitcation"
-    os.popen('openssl req -x509 -nodes -days 1000 -newkey rsa:1024 -out /etc/bcfg2.key -keyout /etc/bcfg2.key')
+    os.popen('openssl req -x509 -nodes -days 1000 -newkey rsa:1024 -out %s/bcfg2.key -keyout %s/bcfg2.key' % (keypath, keypath))
     try:
-        os.chmod('/etc/bcfg2.key','0600')
+        os.chmod('%s/bcfg2.key'% keypath,'0600')
     except:
         pass

#449 desai [email protected] fixed ValueError: list.remove(x): x not in list in bcfg2-info
Description

# bcfg2-info ...

groups

command failure Traceback (most recent call last):

File "/usr/bin/bcfg2-info", line 238, in ?

dispatch[ucmd[0]](ucmd, bcore)

File "/usr/bin/bcfg2-info", line 137, in doGroups

gdata.remove(group)

ValueError?: list.remove(x): x not in list

#450 desai [email protected] fixed Comments in Deps/*.xml cause operation GetConfig to complete with fault
Description

If I use a Deps file that looks like this:

<Dependencies priority="0">
        <Group name="debian-etch">
                <!-- Testing -->
                <Package name="bcfg2">
                        <Package name="debsums"/>
                        <Package name="python"/>
                        <Package name="python-apt"/>
                        <Package name="python-central"/>
                        <Package name="python-lxml"/>
                        <Package name="ucf"/>
                </Package>
        </Group>
</Dependencies>

I can run bcfg2 -v -d -e and get a successful run. However, if I move the XML comment down one level so the Deps file looks like this:

<Dependencies priority="0">
        <Group name="debian-etch">
                <Package name="bcfg2">
                        <!-- Testing -->
                        <Package name="debsums"/>
                        <Package name="python"/>
                        <Package name="python-apt"/>
                        <Package name="python-central"/>
                        <Package name="python-lxml"/>
                        <Package name="ucf"/>
                </Package>
        </Group>
</Dependencies>

The client outputs an error message like this:

GetProbes completed successfully
Operation GetConfig completed with fault
Failed to download configuration from bcfg2

and the server log (syslog) contains this message:

Client 192.168.2.34 called function GetConfig with wrong argument
count Traceback (most recent call last): File
"/usr/lib/python2.4/site-packages/Bcfg2/Server/Component.py", line
174, in _cobalt_marshalled_dispatch response = self._dispatch(method,
(address, ) + params) File "SimpleXMLRPCServer.py", line 406, in
_dispatch return func(*params) File "/usr/sbin/bcfg2-server", line
187, in Bcfg2GetConfig return
tostring(self.Core.BuildConfiguration(client)) File
"/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 308, in
BuildConfiguration prereqs =
self.plugins['Deps'].GeneratePrereqs(structures, meta) File
"/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/Deps.py", line
94, in GeneratePrereqs lxml.etree.SubElement(newstruct, tag,
name=name) File "etree.pyx", line 1633, in etree.SubElement File
"apihelpers.pxi", line 554, in etree._getNsTag File "apihelpers.pxi",
line 502, in etree._utf8 TypeError: Argument must be string or
unicode.

I guess I expected the XML comments to be ignored by bcfg2 and to have no effect on the operation of the server.

I am running on Debian etch using a self-build bcfg2 server and client based on the 0.9.3 release tag from SVN.

Note: See TracQuery for help on using queries.