From bf308a12a1f87ead18f7c8478ada93dc292bfcba Mon Sep 17 00:00:00 2001 From: Jake Yip Date: Tue, 20 Jul 2021 17:03:08 +1000 Subject: [PATCH] Allow ovn_db_sync to continue on duplicate normalised CIDR OVN now uses normalised CIDR when adding a security group rule[1]. It uses may_exist=True for adding ACL (secgroup rule), in case there are multiple CIDRs in neutron that normalises to the same. Do the same in ovn_db_sync, so that the sync don't fail hard on such duplicates. [1] https://review.opendev.org/c/openstack/neutron/+/736386/ Change-Id: I9d9c21e460029e4a6a845520bfcc2889ad20429b Related-Bug: #1869129 Closes-Bug: #1961112 (cherry picked from commit 5a0a2b7847da067817640404f53e0807755e08d7) --- .../plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py index 01ded72116f..54adb88bd46 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py @@ -297,7 +297,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer): for acla in neutron_acls: LOG.warning('ACL found in Neutron but not in ' 'OVN DB for port group %s', acla['port_group']) - txn.add(self.ovn_api.pg_acl_add(**acla)) + txn.add(self.ovn_api.pg_acl_add(**acla, may_exist=True)) with self.ovn_api.transaction(check_error=True) as txn: for aclr in ovn_acls: