commit ae16e697cdbaf11af903f47ac0a5e51ce90cd6bb
Author: Fernando Royo <email address hidden>
Date: Mon Jan 31 14:13:29 2022 +0100
Fix race condition retrieving logical router rows
Using rows.values() via the ovsdbapp API is inherently
racy as if there are multiple threads an add/delete can
interfere, triggering a RuntimeError (dictionary changed
size during iteration).
In one case we now directly use lookup() as we were
looking for a specific logical router.
In the other two cases we create a new class to do the
operation in a transaction, making it idempotent, since
both need to iterate the returned list.
Also changed the IDL notify code to use a frozen row to
similary avoid any possible race condition with there.
Reviewed: https:/ /review. opendev. org/c/openstack /ovn-octavia- provider/ +/827077 /opendev. org/openstack/ ovn-octavia- provider/ commit/ ae16e697cdbaf11 af903f47ac0a5e5 1ce90cd6bb
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit ae16e697cdbaf11 af903f47ac0a5e5 1ce90cd6bb
Author: Fernando Royo <email address hidden>
Date: Mon Jan 31 14:13:29 2022 +0100
Fix race condition retrieving logical router rows
Using rows.values() via the ovsdbapp API is inherently
racy as if there are multiple threads an add/delete can
interfere, triggering a RuntimeError (dictionary changed
size during iteration).
In one case we now directly use lookup() as we were
looking for a specific logical router.
In the other two cases we create a new class to do the
operation in a transaction, making it idempotent, since
both need to iterate the returned list.
Also changed the IDL notify code to use a frozen row to
similary avoid any possible race condition with there.
Closes-bug: #1936959 fab2fb71ef70efa 603f393de2) /review. opendev. org/c/openstack /devstack/ +/827155 380e8532ec68120 dc200f26062
(cherry picked from commit fab03e7c6d3f61a
DependsOn: https:/
Change-Id: Icd4c83b4f63a90