Bug 1970596
| Summary: | Downstream unit tests broken due to missing config option registration | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Brian Haley <bhaley> |
| Component: | python-networking-ovn | Assignee: | OSP Team <rhos-maint> |
| Status: | CLOSED ERRATA | QA Contact: | Eran Kuris <ekuris> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 16.1 (Train) | CC: | apevec, lhh, majopela, scohen |
| Target Milestone: | z7 | Keywords: | Triaged |
| Target Release: | 16.1 (Train on RHEL 8.2) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-networking-ovn-7.3.1-1.20210624183314.4e24f4c.el8ost | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-12-09 20:19:41 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.1.7 (Train) bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:3762 |
While debugging a failure in a downstream patch, I noticed a unit test was failing due to a missing config registration: ============================== Failed 1 tests - output below: ============================== networking_ovn.tests.unit.agent.metadata.test_driver.TestMetadataDriverProcess.test_spawn_metadata_proxy -------------------------------------------------------------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~~ b'Traceback (most recent call last):' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2193, in __getattr__' b' return self._get(name)' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2627, in _get' b' value, loc = self._do_get(name, group, namespace)' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2645, in _do_get' b' info = self._get_opt_info(name, group)' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2845, in _get_opt_info' b' raise NoSuchOptError(opt_name, group)' b'oslo_config.cfg.NoSuchOptError: no such option enable_rate_limiting in group [DEFAULT]' b'' b'During handling of the above exception, another exception occurred:' b'' b'Traceback (most recent call last):' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/neutron/tests/base.py", line 181, in func' b' return f(self, *args, **kwargs)' b' File "/networking-ovn/networking_ovn/tests/unit/agent/metadata/test_driver.py", line 80, in test_spawn_metadata_proxy' b' network_id=datapath_id)' b' File "/networking-ovn/networking_ovn/agent/metadata/driver.py", line 237, in spawn_monitored_metadata_proxy' b' pm.enable()' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/neutron/agent/linux/external_process.py", line 86, in enable' b' cmd = cmd_callback(self.get_pid_file_name())' b' File "/networking-ovn/networking_ovn/agent/metadata/driver.py", line 219, in callback' b' haproxy.create_config_file()' b' File "/networking-ovn/networking_ovn/agent/metadata/driver.py", line 159, in create_config_file' b' if cfg.CONF.enable_rate_limiting:' b' File "/networking-ovn/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2197, in __getattr__' b' raise NoSuchOptError(name)' b'oslo_config.cfg.NoSuchOptError: no such option enable_rate_limiting in group [DEFAULT]' This option was added to the code in commit 361928d16e9006d9d438e9663c3101bd59d1b785, https://code.engineering.redhat.com/gerrit/c/networking-ovn/+/239104 (Rate limit of metadata requests). The problem is the unit test never called to register this new option as is done in other tests. I also noticed the driver code itself doesn't register the options, although it does seem to work.