keystonemiddleware UTs sometimes (pretty often, but not consistently) fail with a DuplicateOptError as seen here: http://logs.openstack.org/73/217373/6/check/gate-keystonemiddleware-python34/03e20d0/console.html
2015-09-09 23:26:24.494 | FAIL: keystonemiddleware.tests.unit.auth_token.test_user_auth_plugin.V2UserPluginTests.test_with_service_information
2015-09-09 23:26:24.494 | tags: worker-3
2015-09-09 23:26:24.495 | ----------------------------------------------------------------------
2015-09-09 23:26:24.495 | Empty attachments:
2015-09-09 23:26:24.495 | pythonlogging:''
2015-09-09 23:26:24.495 | stderr
2015-09-09 23:26:24.495 | stdout
2015-09-09 23:26:24.495 |
2015-09-09 23:26:24.495 | Traceback (most recent call last):
2015-09-09 23:26:24.496 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/keystonemiddleware/tests/unit/auth_token/test_user_auth_plugin.py", line 95, in setUp
2015-09-09 23:26:24.496 | tenant_id=self.service_token.tenant_id)
2015-09-09 23:26:24.497 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/keystonemiddleware/tests/unit/auth_token/test_user_auth_plugin.py", line 32, in configure_middleware
2015-09-09 23:26:24.497 | self.cfg.register_opts(opts, group=group)
2015-09-09 23:26:24.497 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/.tox/py34/lib/python3.4/site-packages/oslo_config/fixture.py", line 105, in register_opts
2015-09-09 23:26:24.497 | self.register_opt(opt, group=group)
2015-09-09 23:26:24.497 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/.tox/py34/lib/python3.4/site-packages/oslo_config/fixture.py", line 93, in register_opt
2015-09-09 23:26:24.497 | self.conf.register_opt(opt, group=group)
2015-09-09 23:26:24.497 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/.tox/py34/lib/python3.4/site-packages/oslo_config/cfg.py", line 1824, in __inner
2015-09-09 23:26:24.498 | result = f(self, *args, **kwargs)
2015-09-09 23:26:24.498 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/.tox/py34/lib/python3.4/site-packages/oslo_config/cfg.py", line 1967, in register_opt
2015-09-09 23:26:24.498 | return group._register_opt(opt, cli)
2015-09-09 23:26:24.498 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/.tox/py34/lib/python3.4/site-packages/oslo_config/cfg.py", line 1345, in _register_opt
2015-09-09 23:26:24.498 | if _is_opt_registered(self._opts, opt):
2015-09-09 23:26:24.498 | File "/home/jenkins/workspace/gate-keystonemiddleware-python34/.tox/py34/lib/python3.4/site-packages/oslo_config/cfg.py", line 574, in _is_opt_registered
2015-09-09 23:26:24.499 | raise DuplicateOptError(opt.name)
2015-09-09 23:26:24.501 | oslo_config.cfg.DuplicateOptError: duplicate option: user-name
How to reproduce:
Just run `tox -e py27` in the keystonemiddleware code base serially, you will hit the failure as this.
This is referenced with this commit (https://review.openstack.org/#/c/216579) but it is not the root cause, we will still see the DuplicateOptError with user-id option but it's relatively not such frequently.
Getting close..
Isolated the test failure in : https:/ /github. com/openstack/ keystonemiddlew are/blob/ master/ keystonemiddlew are/tests/ unit/auth_ token/test_ auth_token_ middleware. py#L691- L702