yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72042
[Bug 1759345] Re: -with-oslo-master job fails with DuplicateOptError: duplicate option: polling_interval
Reviewed: https://review.openstack.org/557003
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a1b49c796e44df35318fc35327b132aae22dce48
Submitter: Zuul
Branch: master
commit a1b49c796e44df35318fc35327b132aae22dce48
Author: Ihar Hrachyshka <ihrachys@xxxxxxxxxx>
Date: Tue Mar 27 11:32:37 2018 -0700
Don't define polling_interval option in two places
The option is currently defined in two places - as a generic agent
option and as a sriov agent specific one. This is a problem now that
oslo.config tracks location where options are defined
(I6dec1e09dcab203c6287f9c56c866f220a42f850) because when unit test
runner imports all modules, it registers the option from those two
separate locations, and since locations are different, it's considered
the options are duplicate, which results in the following error:
DuplicateOptError: duplicate option: polling_interval
To fix the issue, I removed the definition of the option from sriov
module and made sure the common agent options are registered whenever
the sriov module is imported.
Change-Id: I485532692f4b3a5804885e0325a8352fe6b1aa65
Closes-Bug: #1759345
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1759345
Title:
-with-oslo-master job fails with DuplicateOptError: duplicate option:
polling_interval
Status in neutron:
Fix Released
Bug description:
http://logs.openstack.org/periodic/git.openstack.org/openstack/neutron/master
/openstack-tox-py27-with-oslo-master/f65fec8/job-output.txt.gz
2018-03-27 06:16:32.984356 | ubuntu-xenial | --- import errors ---
2018-03-27 06:16:32.984599 | ubuntu-xenial | Failed to import test module: neutron.tests.unit.plugins.ml2.drivers.mech_sriov.agent.common.test_config
2018-03-27 06:16:32.984708 | ubuntu-xenial | Traceback (most recent call last):
2018-03-27 06:16:32.985036 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
2018-03-27 06:16:32.985174 | ubuntu-xenial | module = self._get_module_from_name(name)
2018-03-27 06:16:32.985496 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
2018-03-27 06:16:32.985563 | ubuntu-xenial | __import__(name)
2018-03-27 06:16:32.985804 | ubuntu-xenial | File "neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/common/test_config.py", line 21, in <module>
2018-03-27 06:16:32.985993 | ubuntu-xenial | from neutron.plugins.ml2.drivers.mech_sriov.agent.common import config
2018-03-27 06:16:32.986193 | ubuntu-xenial | File "neutron/plugins/ml2/drivers/mech_sriov/agent/common/config.py", line 57, in <module>
2018-03-27 06:16:32.986351 | ubuntu-xenial | agent_common_config.register_agent_sriov_nic_opts()
2018-03-27 06:16:32.986588 | ubuntu-xenial | File "neutron/conf/plugins/ml2/drivers/mech_sriov/agent_common.py", line 56, in register_agent_sriov_nic_opts
2018-03-27 06:16:32.986717 | ubuntu-xenial | cfg.register_opts(agent_opts, 'AGENT')
2018-03-27 06:16:32.987017 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2416, in __inner
2018-03-27 06:16:32.987129 | ubuntu-xenial | result = f(self, *args, **kwargs)
2018-03-27 06:16:32.987458 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2614, in register_opts
2018-03-27 06:16:32.987604 | ubuntu-xenial | self.register_opt(opt, group, clear_cache=False)
2018-03-27 06:16:32.987969 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2420, in __inner
2018-03-27 06:16:32.988101 | ubuntu-xenial | return f(self, *args, **kwargs)
2018-03-27 06:16:32.988437 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2590, in register_opt
2018-03-27 06:16:32.988546 | ubuntu-xenial | return group._register_opt(opt, cli)
2018-03-27 06:16:32.988847 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 1886, in _register_opt
2018-03-27 06:16:32.988952 | ubuntu-xenial | if _is_opt_registered(self._opts, opt):
2018-03-27 06:16:32.989257 | ubuntu-xenial | File "/home/zuul/src/git.openstack.org/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 801, in _is_opt_registered
2018-03-27 06:16:32.989352 | ubuntu-xenial | raise DuplicateOptError(opt.name)
2018-03-27 06:16:32.989475 | ubuntu-xenial | DuplicateOptError: duplicate option: polling_interval
It happens because test runner imports two different modules with the
same option defined. This is a problem now that oslo.config tracks
location of option definitions and consider it a conflict if the same
option is declared in different locations. (The trigger is
https://review.openstack.org/#/c/537399/)
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1759345/+subscriptions
References