[openstack-dev] guidance re: cfg module usage -- failure to recognize options in nova.conf
Eric Hankins
erhankins at gmail.com
Wed Apr 10 23:49:11 UTC 2013
All,
Apologies for what is hopefully a simple issue...been staring at it for far
too long and I'm not sure what I'm missing.
I've been fixing up the nova-dns module I found on github to manage inserts
of new instance DNS info into PowerDNS.
It configures its kombu BrokerConnection with the following params block:
self.params = dict(hostname=FLAGS.rabbit_host,
port=FLAGS.rabbit_port,
userid=FLAGS.rabbit_userid,
password=FLAGS.rabbit_password,
virtual_host=FLAGS.rabbit_virtual_host)
When I go to fire it up, it's claiming that rabbit_host isn't defined:
Traceback (most recent call last):
File "/usr/bin/nova-dns", line 55, in <module>
service.serve(dns.Service(), amqp.Service())
File "/usr/lib/pymodules/python2.7/nova_dns/amqp.py", line 50, in __init__
self.params = dict(hostname=FLAGS.rabbit_host,
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/cfg.py",
line 1039, in __getattr__
return self._get(name)
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/cfg.py",
line 1361, in _get
value = self._substitute(self._do_get(name, group))
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/cfg.py",
line 1377, in _do_get
info = self._get_opt_info(name, group)
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/cfg.py",
line 1470, in _get_opt_info
raise NoSuchOptError(opt_name, group)
nova.openstack.common.cfg.NoSuchOptError: no such option: rabbit_host
However, it clearly is, under my [DEFAULT] block in nova.conf:
# grep rabbit_host /etc/nova/nova.conf
rabbit_host=localhost
strace confirms that nova.conf is being read in, and I'm at a loss as to
why cfg is saying it's not there. And no other OpenStack components appear
to have difficulty of this sort. I tried refactoring from the legacy gflags
wrapper class and using cfg directly, but the same exception is raised...
Any pointers for helping me debug this are greatly appreciated. Full code
is here: https://github.com/reachlocal/nova-dns
thanks in advance!
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130410/bdca5563/attachment.html>
More information about the OpenStack-dev
mailing list