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