components/openstack/neutron/patches/vpnaas-01-vpn_db.patch_1
changeset 6848 8e252a37ed0d
parent 5405 66fd59fecd68
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openstack/neutron/patches/vpnaas-01-vpn_db.patch_1	Wed Sep 07 14:48:41 2016 -0700
@@ -0,0 +1,28 @@
+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
+