[openstack-dev] [keystone] [oslo.config] [nova] [tox/testr] DuplicateOptError from oslo.config on middleware

Chmouel Boudjnah chmouel at enovance.com
Mon Apr 22 15:35:25 UTC 2013


Hi,

In review :

https://review.openstack.org/#/c/23986/

I am trying to bring some update to the ec2 token middleware shipped
with keystone to bring  caching, tests use the oslo.config module
instead of
nova.flags (which is obsolete in grizzly).

When running the tests I am getting the infamous error :

2013-04-18 21:20:55.442 | DuplicateOptError: duplicate option: log-format

http://logs.openstack.org/23986/3/check/gate-keystone-python26-rhel6/219/console.html.gz

While reading other bug reports on it I understand why this has been
done, to not get a duplication of config flags, but in my case I just
have a middleware designed for nova run in keystone and somehow
oslo.config parse nova and keystone during the tests config flags when
run by tox.

And that's the strange thing when I run the indivual test class the
problem does not show up but only when I run the full test suite :

http://pastie.org/private/x1wdqcrvrzmlk1h6jkazqg

so I am guessing there is some mix up going on somewhere while runing
the full test suite.


The solution/workarounds I can see are :

1) Move ec2_token to nova source tree.
2) do a try: catch(DuplicateError): pass  when parsing the flags.
3) Don't use nova for wsgi but the one from keystone.
4) fix tox.

I don't like 3 because it would assume we need to install keystone
package to use ec2token middleware which should be used only with nova
so then i'm in favor of 1) because 2) is just plain ugly and I have
spent too much time trying to figure out how to do 4) that I am just
avoiding it (infra peps if you have any ideas?).

Toughts?


Chmouel.


PS: I wonder if I could have put more mailing list tags to that mail :)



More information about the OpenStack-dev mailing list