commit 4b06bf4d9fb949a7d816cc619ce4bead28d2850f
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/ +/828796 /opendev. org/openstack/ neutron/ commit/ 4b06bf4d9fb949a 7d816cc619ce4be ad28d2850f
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 4b06bf4d9fb949a 7d816cc619ce4be ad28d2850f
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