glance-control registry start tracebacks w/ IndexError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Undecided
|
Mark McLoughlin |
Bug Description
I wanted to test a trivial and obviously correct fix for bug 917438 properly, so I built and installed git HEAD. The configuration files are properly updated for the xxxx-paste.ini breakout (verified by inspection). But on start, this happens:
[root@kvm-rei zaitcev]# glance-control registry start
Traceback (most recent call last):
File "/usr/bin/
do_
File "/usr/bin/
conf_file = conf.config_
IndexError: list index out of range
This worked with Glance 2011.3 RPM packaged by markmc.
It seems to me that this code cannot possibly work, and I do not know how to fix it. A suggestion from author is necessary.
bin/glance-control does
if __name__ == '__main__':
conf = config.
args = conf()
server = args.pop(0).lower()
...........
try:
if args and os.path.
else:
# Assume paste config is in the last config file
except RuntimeError, err:
This fails because config_file can only be set when the paste configuration is processed, but this cannot be done until the server is known, which happens after the conf is constructed.
Note that although this configuration is one that does not set either flavour= or config_file= it is not the problem here. Problem is that glance-control loads the configuration before it knows the server.
Possibly related commit 57c4e9b6c686f13
Changed in glance: | |
assignee: | nobody → Mark McLoughlin (markmc) |
status: | New → In Progress |
Changed in glance: | |
milestone: | none → essex-3 |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | essex-3 → 2012.1 |
Pete - I think the comment confused you a little here because it refers to "paste config", but the comment harks back to the day when glance's main config file was a paste config file
i.e. this code is brokenly trying to find the config file for the server it is starting