Double-quotes not removed from some nova.conf config values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
The current nova.conf.sample file contains double-quote characters in the value portion of key-value pairs for things like the "image_service" configuration option:
While the Python INI file reader does a fine job of removing the double-quotes, there are a number of code paths in the OpenStack software that don't remove the double quotes. If the source line above were to be uncommented, the following error will occur (pay special attention to the name of the module name - which is DOUBLE_
2012-04-23 14:45:15 CRITICAL nova [-] Class GlanceImageService" could not be found: No module named "nova.image.glance
2012-04-23 14:45:15 TRACE nova Traceback (most recent call last):
2012-04-23 14:45:15 TRACE nova File "/usr/bin/
2012-04-23 14:45:15 TRACE nova servers.
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova self.app = self.loader.
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova return deploy.
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova return loadobj(APP, uri, name=name, **kw)
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova return context.create()
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova return self.object_
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova **context.
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova val = callable(*args, **kw)
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova app = loader.
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova name=name, global_
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova return self.object_
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova **context.
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova val = callable(*args, **kw)
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova app = filter(app)
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova return cls(app, **local_config)
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova self.controller = utils.import_
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova self.image_service = s3.S3ImageService()
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova self.service = service or image.get_
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova ImageService = utils.import_
2012-04-23 14:45:15 TRACE nova File "/usr/lib/
2012-04-23 14:45:15 TRACE nova raise exception.
2012-04-23 14:45:15 TRACE nova ClassNotFound: Class GlanceImageService" could not be found: No module named "nova.image.glance
Also note the class name is GlanceImageServ
Either fix the way that modules and class names are extracted from the configuration file, or remove the double-quoted values from the config file. I'd suggest doing the former as it seems like a bug to not use the values returned by the Python ConfigParser (since they go through some sanitizer steps before being handed off to the developer).
Thanks for OpenStack - enjoying it so far :)
summary: |
- nova.conf.sample contains illegal INI file format characters + Double-quotes not removed from some nova.conf config values |
tags: | added: docimpact |