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.

Closes-Bug: #1410777

Change-Id: I0e887b1401daec991f2244fb897a4b1dd206bf35
This commit is contained in:
Salvatore Orlando 2015-01-08 06:37:34 -08:00
parent be7564875e
commit 0e3299d69c
1 changed files with 11 additions and 0 deletions

View File

@ -1958,6 +1958,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