On 8/9/24 20:06, Rosemarie O'Riorden wrote:
> Static_MAC_Binding (SMB) records are only deleted from the
> southbound-db via ovn-northd when there is no such SMB found in the
> northbound-db. This leads to problems when a port becomes stale (ex.
> through lr deletion), because the Logical_Router and Logical_Router_Port
> records are removed from the nb-db, but not the Static_MAC_Binding record.
> 
> So, when ovn-northd attempts to remove the corresponding
> Datapath_Binding and Port_Binding records from sb-db, it fails because
> of a referential integrity violation: the Static_MAC_Binding record
> contains a reference to Datapath_Binding.
> 
> The corrected behavior is that SMB's are now deleted:
> 1. when there's no such SMB in the nb-db, and
> 2. when there is no port in the nb-db with the SMB's associated port name.
> Thus, all three records, Datapath_Binding, Port_Binding, and
> Static_MAC_Binding, are removed within the same transaction.
> 
> Also added a unit test to verify correct behavior.
> 
> Fixes: b22684d4e37c ("Add a northbound interface to program MAC_Binding 
> table")
> Reported-at: https://issues.redhat.com/browse/FDP-723
> Signed-off-by: Rosemarie O'Riorden <[email protected]>
> ---
> v3:
>  - Fixed checkpatch errors.
> v2:
>  - Simplified/neatened code in northd/northd.c, kept logic the same.
> ---
>  northd/northd.c     |  9 ++++++++-
>  tests/ovn-northd.at | 13 +++++++++++++
>  2 files changed, 21 insertions(+), 1 deletion(-)


Recheck-request: github-robot-_Build_and_Test
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to