yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07610
[Bug 1262148] Re: duplicated definition of config option memcached_servers
I dig into this a little bit.
The config.generator works by first importing all the python modules,
then for each imported python module, it will try to find all the CfgOpt
options in it and print it.
During the finding process, the config.generator._guess_groups() will
try to find if the CfgOpt is belonging to the 'DEFAULT' group or other
groups, this is where the error happens.
The reason behind this is that "keystoneclient.middleware.auth_token"
imports "keystoneclient.openstack.common.memorycache" which registers an
option "memcached_servers". Later, when importing
"nova.openstack.common.memorycache" which also has the same option
"memcached_servers" , that option is never registered because we
already have the same option from keystoneclient registered.
When the config.generator "_guess_groups()" the option
"memcached_servers" from "nova.openstack.common.memorycache", it uses
operator '==' to compare if two options are the same. But the
oslo.cfg.Opt class doesn't implement the __eq__ method, it only
implements the __ne__ method. That's why the '==' operator doesn't give
us the expected result.
We should implement the __eq__ method in oslo.cfg. Before that, we
should use 'not a == b' in the config.generator as a temporary
workaround.
** Also affects: oslo
Importance: Undecided
Status: New
** Changed in: python-keystoneclient
Status: New => Invalid
** Changed in: nova
Status: New => Invalid
** Changed in: oslo
Assignee: (unassigned) => Lianhao Lu (lianhao-lu)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1262148
Title:
duplicated definition of config option memcached_servers
Status in OpenStack Compute (Nova):
Invalid
Status in Oslo - a Library of Common OpenStack Code:
New
Status in Python client library for Keystone:
Invalid
Bug description:
When using the latest config generator from oslo-incubator, see
https://review.openstack.org/62815, and trying to generate the
nova.conf.sample by using the following commands:
NOVA_CONFIG_GENERATOR_EXTRA_MODULES=keystoneclient.middleware.auth_token
tools/config/generate_sample.sh -p nova
2013-12-18 18:22:03.187 30506 CRITICAL nova [-] Unable to find group
for option memcached_servers, maybe it's defined twice in the same
group?
This is because the config option memcached_servers is defined both in the python module keystoneclient.middleware.auth_token and nova.openstack.common.memorycache.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1262148/+subscriptions
References