Browse Source

Use an interprocess lock for physnets

bind_port gets called in the API worker, of which there may be
multiple processes. This change passes external=True to ensure
we use an interprocess lock.

Change-Id: Ia4a94f00ef94faf8d4b6892550d32a6540c8e989
changes/58/707458/1
Mitchell Jameson 1 week ago
parent
commit
1dce57fa75
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      networking_arista/ml2/mechanism_arista.py

+ 1
- 1
networking_arista/ml2/mechanism_arista.py View File

@@ -315,7 +315,7 @@ class AristaDriver(driver_api.MechanismDriver):
"found", {'port': port_id})
return False

with lockutils.lock(physnet):
with lockutils.lock(physnet, external=True):
context.allocate_dynamic_segment(
{'network_id': context.network.current['id'],
'network_type': n_const.TYPE_VLAN,

Loading…
Cancel
Save