neutron/neutron/tests/unit/plugins/ml2/drivers/ovn/agent
Rodolfo Alonso Hernandez 9182712672 [OVN] Protect the AgentCache iteration by copying the local cache
During the execution of ``AgentCache.__iter__``, the content of
"self.agents" can change; the Neutron server can attend to an event
to add or delete an OVN agent. If that happens, the iteration will
fail with the error:
  "RuntimeError: dictionary changed size during iteration"

To avoid this, before iterating the list of agents, the cache
singleton creates a copy of the local cache. The aim of making this
copy is to avoid using locks between threads.

Conflicts:
    neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py

Closes-Bug: #1976292
Change-Id: Icf92685579409282bad0a80ba42531c93738e0b1
(cherry picked from commit a71fe45d96)
(cherry picked from commit eb562b60a3)
2022-05-17 07:33:04 +00:00
..
__init__.py [OVN] Protect the AgentCache iteration by copying the local cache 2022-05-17 07:33:04 +00:00
test_neutron_agent.py [OVN] Protect the AgentCache iteration by copying the local cache 2022-05-17 07:33:04 +00:00