components/openstack/neutron/patches/vpnaas-01-vpn_db.patch_1
author Laszlo Peter <laszlo.peter@oracle.com>
Wed, 07 Sep 2016 14:48:41 -0700
changeset 6848 8e252a37ed0d
parent 5405 components/openstack/neutron/vpnaas_patches/01-vpn_db_add_solaris.patch@66fd59fecd68
permissions -rw-r--r--
PSARC 2016/268 Neutron EVS Plugin EOF 24465835 Update Neutron for the Mitaka release 22271305 EOF monolithic neutron plugin for Openstack 18734794 port-create --fixed-ip accepts invalid argument, creates port with wrong IP

This works around a l3-agent bug which causes an exception if l3-agent is
started and no VPN's have been defined. This function gets called with
kwargs being NULL.

This patch is Solaris-specific and not suitable for upstream
contribution.

--- neutron-vpnaas-8.0.0/neutron_vpnaas/db/vpn/vpn_db.py.~1~	2016-04-07 00:44:22.000000000 -0700
+++ neutron-vpnaas-8.0.0/neutron_vpnaas/db/vpn/vpn_db.py	2016-05-08 21:39:11.200481880 -0700
@@ -721,11 +721,15 @@ def vpn_callback(resource, event, trigge
 
 
 def migration_callback(resource, event, trigger, **kwargs):
-    context = kwargs['context']
-    router = kwargs['router']
+    try:
+        context = kwargs['context']
+        router = kwargs['router']
+    except:
+        context = []
+        pass
     vpn_plugin = manager.NeutronManager.get_service_plugins().get(
         p_constants.VPN)
-    if vpn_plugin:
+    if vpn_plugin and context:
         vpn_plugin.check_router_in_use(context, router['id'])
     return True