Comment 2 for bug 1976292

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/843933
Committed: https://opendev.org/openstack/neutron/commit/a71fe45d9628f0dc67ccd12d94a51a7b801ec9d0
Submitter: "Zuul (22348)"
Branch: master

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.

    Closes-Bug: #1976292
    Change-Id: Icf92685579409282bad0a80ba42531c93738e0b1