Modify ↓
Ticket #438 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.
Your assessment is completely correct. I've changed bcfg2-info sources and the man page to just use -C. Resolved in [8adfe17bdd50d32f19ebadefa7c1f26553590b46] (SVN r3111).