Modify

Ticket #438 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

bcfg2-info doesn't respect -c option

Reported by: [email protected] Owned by: desai
Priority: minor Milestone:
Component: bcfg2-server Version:
Keywords: bcfg2-info Cc:

Description

I am trying to test out my config spec by running bcfg2-info and specifying a config file on the command line using the -c parameter as described in the manual page. I get the following error:

$ /usr/sbin/bcfg2-info -c test.conf
Creating new statistics file ./etc/statistics.xml
Failed to read properties file; TCheetah properties disabled
Unexpected initiantiation failure for plugin Metadata
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 240, in __init__
    self.plugins[plugin] = struct(self, self.datastore)
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/Metadata.py", line 72, in __init__
    self.password = CP.get('communication', 'password')
  File "ConfigParser.py", line 511, in get
    raise NoSectionError(section)
NoSectionError: No section: 'communication'
Traceback (most recent call last):
  File "/usr/sbin/bcfg2-info", line 187, in ?
    bcore = Bcfg2.Server.Core.Core({}, cfile)
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 246, in __init__
    self.metadata = self.plugins['Metadata']
KeyError: 'Metadata'
>>>
KeyboardInterrupt
>>>

In investigating the code for Metadata.py around line 68, it appears to use a capital -C argument instead of a lowercase -c argument for specifying the config file. When I run bcfg2-info -c test.conf -C test.conf, the correct config file seems to be used and the program behaves as I would have expected using just bcfg2-info -c test.conf.

I'm running bcfg2 version 0.9.3 using a self-built Debian package created from a local working copy of https://svn.mcs.anl.gov/repos/bcfg/tags/bcfg2_0_9_3/bcfg2.

Attachments

Change History

comment:1 Changed 15 years ago by desai

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

Your assessment is completely correct. I've changed bcfg2-info sources and the man page to just use -C. Resolved in [8adfe17bdd50d32f19ebadefa7c1f26553590b46] (SVN r3111).

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.