commit 29b08d9765c79285ee899d5b0166728cec69e56a
Author: Daniel Alvarez Sanchez <email address hidden>
Date: Fri Feb 4 11:32:47 2022 +0100
[ovn] Prevent stale ports in the OVN database
Under a lot of load, there can be situations where all the Neutron
workers have not updated their in-memory copy of the NB database
in time before certain operations.
This scenario can lead to stale resources when a somewhat recently
created port is attempted to be deleted, but the worker handling
this deletion doesn't know about the OVN port yet.
This patch detects this condition and allows some time (at least one
maintenance task cycle) before it deletes the OVN revision number.
If the port then shows up in the OVN database within that window, then
it will be deleted later by the maintenance task avoiding the stale
ports. If not, the revision number row will be deleted and we won't
stale these entries either.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/828797 /opendev. org/openstack/ neutron/ commit/ 29b08d9765c7928 5ee899d5b016672 8cec69e56a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit 29b08d9765c7928 5ee899d5b016672 8cec69e56a
Author: Daniel Alvarez Sanchez <email address hidden>
Date: Fri Feb 4 11:32:47 2022 +0100
[ovn] Prevent stale ports in the OVN database
Under a lot of load, there can be situations where all the Neutron
workers have not updated their in-memory copy of the NB database
in time before certain operations.
This scenario can lead to stale resources when a somewhat recently
created port is attempted to be deleted, but the worker handling
this deletion doesn't know about the OVN port yet.
This patch detects this condition and allows some time (at least one
maintenance task cycle) before it deletes the OVN revision number.
If the port then shows up in the OVN database within that window, then
it will be deleted later by the maintenance task avoiding the stale
ports. If not, the revision number row will be deleted and we won't
stale these entries either.
Conflicts:
neutron/ plugins/ ml2/drivers/ ovn/mech_ driver/ ovsdb/ovn_ client. py
Closes-Bug: #1960006 9e3a62363a4f805 ef8287d15b9 3900c9c1a08e128 08cf5ed2ec)
Signed-off-by: Daniel Alvarez Sanchez <email address hidden>
Change-Id: Ie4093dc6cd63b8
(cherry picked from commit be7331c8169c53e