Merge "Follow up on a small nit from patch 875989 [1]"

This commit is contained in:
Zuul 2023-07-24 16:20:37 +00:00 committed by Gerrit Code Review
commit de2494da5f

View File

@ -299,7 +299,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
'remove': num_acls_to_remove}) 'remove': num_acls_to_remove})
if self.mode == SYNC_MODE_REPAIR: if self.mode == SYNC_MODE_REPAIR:
pg_resync_count = 0 one_time_pg_resync = True
while True: while True:
try: try:
with self.ovn_api.transaction(check_error=True) as txn: with self.ovn_api.transaction(check_error=True) as txn:
@ -311,13 +311,13 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
**acla, may_exist=True)) **acla, may_exist=True))
except idlutils.RowNotFound as row_err: except idlutils.RowNotFound as row_err:
if row_err.msg.startswith("Cannot find Port_Group"): if row_err.msg.startswith("Cannot find Port_Group"):
if pg_resync_count < 1: if one_time_pg_resync:
LOG.warning('Port group row was not found during ' LOG.warning('Port group row was not found during '
'ACLs sync. Will attempt to sync port ' 'ACLs sync. Will attempt to sync port '
'groups one more time. The caught ' 'groups one more time. The caught '
'exception is: %s', row_err) 'exception is: %s', row_err)
self.sync_port_groups(ctx) self.sync_port_groups(ctx)
pg_resync_count += 1 one_time_pg_resync = False
continue continue
LOG.error('Port group exception during ACL sync ' LOG.error('Port group exception during ACL sync '
'even after one more port group resync. ' 'even after one more port group resync. '