NSX: synchronize floating IP operations

This patch simply adds floating IP operations (create, update,
and delete) to the VMware global mutex already employed for
router gateway operations.

This should prevent the occurence of database lock wait timeout
errors caused by untimely eventlet yields.

Patch applied from stackforge/vmware-nsx commit id
defd249040edb45b49a9d7eb9451dde1dffef69e

Change-Id: Iad794a354412221ba4085637e0622882bbfce82b
Closes-Bug: #1410777
This commit is contained in:
Salvatore Orlando 2015-01-15 02:56:13 -08:00
parent f6c2e7743a
commit 7c82512108
1 changed files with 11 additions and 0 deletions

View File

@ -1952,6 +1952,17 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
'router_id': router_id,
'status': self._floatingip_status(floatingip_db, router_id)})
@lockutils.synchronized('vmware', 'neutron-')
def create_floatingip(self, context, floatingip):
return super(NsxPluginV2, self).create_floatingip(context, floatingip)
@lockutils.synchronized('vmware', 'neutron-')
def update_floatingip(self, context, floatingip_id, floatingip):
return super(NsxPluginV2, self).update_floatingip(context,
floatingip_id,
floatingip)
@lockutils.synchronized('vmware', 'neutron-')
def delete_floatingip(self, context, id):
fip_db = self._get_floatingip(context, id)
# Check whether the floating ip is associated or not