Browse Source

Merge "Avoid port group creation race" into stable/queens

tags/4.0.4^0
Zuul Gerrit Code Review 4 months ago
parent
commit
f5d20263a5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      networking_ovn/common/ovn_client.py

+ 2
- 2
networking_ovn/common/ovn_client.py View File

@@ -1707,11 +1707,11 @@ class OVNClient(object):
with self._nb_idl.transaction(check_error=True) as txn:
if not self._nb_idl.get_port_group(pg_name):
# If drop Port Group doesn't exist yet, create it.
txn.add(self._nb_idl.pg_add(pg_name, acls=[]))
txn.add(self._nb_idl.pg_add(pg_name, acls=[], may_exist=True))
# Add ACLs to this Port Group so that all traffic is dropped.
acls = ovn_acl.add_acls_for_drop_port_group(pg_name)
for acl in acls:
txn.add(self._nb_idl.pg_acl_add(**acl))
txn.add(self._nb_idl.pg_acl_add(may_exist=True, **acl))

if ports:
ports_ids = [port['id'] for port in ports]


Loading…
Cancel
Save