浏览代码

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.1.12
Mitchell Jameson 1 个月前
父节点
当前提交
cf15cc3fe6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      networking_arista/ml2/mechanism_arista.py

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

@@ -313,7 +313,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,


正在加载...
取消
保存