BigSwitch: Semaphore on port status update

Adds a semaphore to the _set_port_status
function used by the Big Switch ML2 driver and
plugin. Without it, the async threads are
susceptible to deadlocking and causing the
known eventlet/mysql timeout exception.

Closes-Bug: #1300607
Change-Id: Ie89213a0bef37f9e7a30945df39c0f1b87a33b82
This commit is contained in:
Kevin Benton 2014-03-31 23:32:41 -07:00
parent 64128cb40a
commit 946c34619d
1 changed files with 2 additions and 0 deletions

View File

@ -436,6 +436,8 @@ class NeutronRestProxyV2Base(db_base_plugin_v2.NeutronDbPluginV2,
# would have deleted an non-existent port.
self.servers.rest_delete_port(tenant_id, net_id, port['id'])
# NOTE(kevinbenton): workaround for eventlet/mysql deadlock
@utils.synchronized('bsn-port-barrier')
def _set_port_status(self, port_id, status):
session = db.get_session()
try: