[OVN] Agent can't be found in functional test sometimes

Bug #1951225 reported by Slawek Kaplonski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
High
Jakub Libosvar

Bug Description

It causes failures of the functional test neutron.tests.functional.plugins.ml2.drivers.ovn.mech_driver.ovsdb.test_ovsdb_monitor.TestAgentMonitor.test_network_agent_present test. Examples:

https://164b3e6c67f8dffddea7-f89a5ef8d1bd221399a14347eddacf71.ssl.cf2.rackcdn.com/814009/17/check/neutron-functional-with-uwsgi/a3fa229/testr_results.html

https://c75035ee6c00054d18c4-7fb3488540a595a48601456545c48d00.ssl.cf1.rackcdn.com/813977/12/check/neutron-functional-with-uwsgi/d85a9df/testr_results.html

Stacktrace:

ft1.2: neutron.tests.functional.plugins.ml2.drivers.ovn.mech_driver.ovsdb.test_ovsdb_monitor.TestAgentMonitor.test_network_agent_presenttesttools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 183, in func
    return f(self, *args, **kwargs)
  File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py", line 315, in test_network_agent_present
    type(neutron_agent.AgentCache()[self.chassis_name]))
  File "/home/zuul/src/opendev.org/openstack/neutron/neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py", line 211, in __getitem__
    return self.agents[key]
KeyError: 'd02bd040-154c-4a45-8da0-9452ebcd5b12'

Revision history for this message
Jakub Libosvar (libosvar) wrote :

Looks like a problem when instantiating singleton agent cache

2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event [req-1182c635-4905-4062-a060-6e445fe25d25 - - - - -] Unexpected exception in notify_loop: ValueError: driver cannot be None
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event Traceback (most recent call last):
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event File "/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-functional/lib/python3.8/site-packages/ovsdbapp/event.py", line 148, in notify_loop
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event match.run(event, row, updates)
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event File "/home/zuul/src/opendev.org/openstack/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py", line 333, in run
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event n_agent.AgentCache().update(ovn_const.OVN_CONTROLLER_AGENT, row,
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event File "/home/zuul/src/opendev.org/openstack/neutron/neutron/common/utils.py", line 941, in __call__
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event self._instance = self._klass(*args, **kwargs)
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event File "/home/zuul/src/opendev.org/openstack/neutron/neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py", line 203, in __init__
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event raise ValueError(_("driver cannot be None"))
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event ValueError: driver cannot be None
2021-11-15 15:00:09.556 52726 ERROR ovsdbapp.event

Changed in neutron:
assignee: nobody → Jakub Libosvar (libosvar)
Revision history for this message
yatin (yatinkarel) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.