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
This commit is contained in:
committed by
Slawek Kaplonski
parent
6266c293dc
commit
5a0a2b7847
@@ -299,7 +299,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
|
|||||||
for acla in neutron_acls:
|
for acla in neutron_acls:
|
||||||
LOG.warning('ACL found in Neutron but not in '
|
LOG.warning('ACL found in Neutron but not in '
|
||||||
'OVN DB for port group %s', acla['port_group'])
|
'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:
|
with self.ovn_api.transaction(check_error=True) as txn:
|
||||||
for aclr in ovn_acls:
|
for aclr in ovn_acls:
|
||||||
|
|||||||
Reference in New Issue
Block a user