[openstack-dev] guidance re: cfg module usage -- failure to recognize options in nova.conf

Eric Hankins erhankins at gmail.com
Thu Apr 11 00:15:15 UTC 2013


Nope...all clear!  Also verified via strace that the nova.conf it's opening
is the one I'm passing it via --config-file

thanks,
-eric


On Wed, Apr 10, 2013 at 5:02 PM, Davanum Srinivas <davanum at gmail.com> wrote:

> Can you please check if you have a nova.conf in your user home directory?
> (~/nova.conf)
>
> -- dims
>
> On Wed, Apr 10, 2013 at 7:49 PM, Eric Hankins <erhankins at gmail.com> wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130410/91e14450/attachment.html>


More information about the OpenStack-dev mailing list