Modify

Ticket #450 (closed defect: fixed)

Opened 16 years ago

Last modified 16 years ago

Comments in Deps/*.xml cause operation GetConfig to complete with fault

Reported by: [email protected] Owned by: desai
Priority: minor Milestone: Bcfg2 0.9.4 Release
Component: bcfg2-server Version:
Keywords: Deps Cc:

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.

Attachments

Change History

comment:1 Changed 16 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to Bcfg2 0.9.4 Release

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.