From: Kevin Benton Date: Tue, 1 Apr 2014 06:32:41 +0000 (-0700) Subject: BigSwitch: Semaphore on port status update X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=946c34619d2adfcf4b9b27d6e907167ff8bfe0b2;p=openstack-build%2Fneutron-build.git 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 --- diff --git a/neutron/plugins/bigswitch/plugin.py b/neutron/plugins/bigswitch/plugin.py index a5ba32081..161b71f8d 100644 --- a/neutron/plugins/bigswitch/plugin.py +++ b/neutron/plugins/bigswitch/plugin.py @@ -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: