Move plugin.delete_port call out of transaction

This might fix a few cases of lock wait timeouts.

Change-Id: Iaa656a8582b2ff3ec55709bbe47b1ac9f5fc2a99
Closes-Bug: #1342166
This commit is contained in:
Eugene Nikanorov 2014-07-19 17:08:53 +04:00
parent f56328738d
commit 8ca05af369
1 changed files with 2 additions and 2 deletions

View File

@ -460,8 +460,8 @@ class LoadBalancerPluginDb(loadbalancer.LoadBalancerPluginBase,
pool.update({"vip_id": None})
context.session.delete(vip)
if vip.port: # this is a Neutron port
self._core_plugin.delete_port(context, vip.port.id)
if vip.port: # this is a Neutron port
self._core_plugin.delete_port(context, vip.port.id)
def get_vip(self, context, id, fields=None):
vip = self._get_resource(context, Vip, id)