From 7c825121080db10ff5aeb1d90d3e434966c1645b Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Thu, 15 Jan 2015 02:56:13 -0800 Subject: [PATCH] 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 --- neutron/plugins/vmware/plugins/base.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/neutron/plugins/vmware/plugins/base.py b/neutron/plugins/vmware/plugins/base.py index 773e8b818e4..b320835c84f 100644 --- a/neutron/plugins/vmware/plugins/base.py +++ b/neutron/plugins/vmware/plugins/base.py @@ -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