Bug 1970596 - Downstream unit tests broken due to missing config option registration
Summary: Downstream unit tests broken due to missing config option registration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z7
: 16.1 (Train on RHEL 8.2)
Assignee: OSP Team
QA Contact: Eran Kuris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-10 18:25 UTC by Brian Haley
Modified: 2021-12-09 20:19 UTC (History)
4 users (show)

Fixed In Version: python-networking-ovn-7.3.1-1.20210624183314.4e24f4c.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-09 20:19:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-5125 0 None None None 2021-11-18 11:33:10 UTC
Red Hat Product Errata RHBA-2021:3762 0 None None None 2021-12-09 20:19:59 UTC

Description Brian Haley 2021-06-10 18:25:08 UTC
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.

Comment 22 errata-xmlrpc 2021-12-09 20:19:41 UTC
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


Note You need to log in before you can comment on or make changes to this bug.