Modify

Ticket #568 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

server can't handle profile specified in clients.xml and on command line

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

Description

I am running bcfg2 0.9.6pre1.

When a client specifies a profile on the command line and has an entry in clients.xml, there is a traceback:

Jun 20 15:22:14 ibm13 bcfg2-server[6946]: Asserting client shoryuken.ma.utexas.edu profile to hardy32
Jun 20 15:22:14 ibm13 bcfg2-server[6946]: Changing shoryuken.ma.utexas.edu group from hardy32 to hardy32
Jun 20 15:22:14 ibm13 bcfg2-server[6946]: Unexpected handler failure Traceback (most recent call last):   File "/usr/lib/python2.5/site-packages/Bcfg2/Component.py", line 220, in _cobalt_marshalled_dispatch     response = self._dispatch(method, (address, ) + params)   File "/usr/lib/python2.5/SimpleXMLRPCServer.py", line 415, in _dispatch     return func(*params)   File "/usr/sbin/bcfg2-server", line 149, in Bcfg2AssertProfile     self.Core.metadata.set_profile(client, profile, address)   File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Plugins/Metadata.py", line 227, in set_profile     cli[0].set('profile', profile) IndexError: list index out of range

When the profile on the command line and the profile in clients.xml match, everything should work. I can understand failing if the profiles don't match. It would be reasonable to ignore either the command line specified profile or the server side profile, though.

This causes problems for reinstallations. I want to be able to install new machines without modifying clients.xml immediately so I put the profile on the command line in the kickstart post install. for a reinstallation, the client is already in clients.xml and so bcfg2 fails.

Attachments

metadata.diff (716 bytes) - added by desai 14 years ago.
patch to Metadata.py

Change History

Changed 14 years ago by desai

patch to Metadata.py

comment:1 Changed 14 years ago by desai

  • Status changed from new to assigned
  • Milestone set to Bcfg2 0.9.6 Release

I suspect this has to do with your use of XInclude (suggested by #567). Does the attached patch fix things for you? (This won't fix the XInclude problem that you reported in #567, which will require more work to fix.

comment:2 Changed 14 years ago by [email protected]

That's strange. Trac didn't email me when you replied. I'm sure it has in the past though.

I will test it today. Thank you.

comment:3 Changed 14 years ago by [email protected]

It works. Thank you.

comment:4 Changed 14 years ago by desai

  • Status changed from assigned to closed
  • Resolution set to fixed

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.