Revert "Add lock for security group rules"

This reverts commit da526e783e.
DBDeadlock was seen during testing with this patch applied.

Change-Id: I50335507fc1b50cb4c0b4818d5e070e5bcbd147a
This commit is contained in:
Thomas Bachman 2018-05-10 13:25:42 +00:00
parent da526e783e
commit 2e4ff341e9
1 changed files with 17 additions and 21 deletions

View File

@ -55,7 +55,6 @@ from neutron_lib.plugins import directory
from opflexagent import constants as ofcst
from opflexagent import host_agent_rpc as arpc
from opflexagent import rpc as ofrpc
from oslo_concurrency import lockutils
from oslo_config import cfg
from oslo_db import exception as db_exc
from oslo_log import log
@ -1786,9 +1785,6 @@ class ApicMechanismDriver(api_plus.MechanismDriver,
security_group_name=sg_rule['security_group_id'],
security_group_subject_name='default',
name=sg_rule['id'])
# REVISIT: remove locking once a more robust solution
# has been implemented
with lockutils.lock(sg_rule['id'], external=True):
aim_sg_rule = self.aim.get(aim_ctx, sg_rule_aim)
if not aim_sg_rule:
continue