commit a71fe45d9628f0dc67ccd12d94a51a7b801ec9d0
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sun May 15 22:48:46 2022 +0000
[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.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/843933 /opendev. org/openstack/ neutron/ commit/ a71fe45d9628f0d c67ccd12d94a51a 7b801ec9d0
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit a71fe45d9628f0d c67ccd12d94a51a 7b801ec9d0
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sun May 15 22:48:46 2022 +0000
[OVN] Protect the AgentCache iteration by copying the local cache
During the execution of ``AgentCache. __iter_ _``, the content of RuntimeError: dictionary changed size during iteration"
"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:
"
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.
Closes-Bug: #1976292 82bad0a80ba4253 1c93738e0b1
Change-Id: Icf926855794092