瀏覽代碼

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
tags/2018.2.7
Mitchell Jameson 1 月之前
父節點
當前提交
b71d322e24
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      networking_arista/ml2/mechanism_arista.py

+ 1
- 1
networking_arista/ml2/mechanism_arista.py 查看文件

@@ -312,7 +312,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…
取消
儲存