From 1f8c1d6e3b73ab9553b4a79da2fc992291fcae61 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Thu, 7 Jul 2016 15:45:53 +0300 Subject: [PATCH] NSXv: Fix failure in lbaas edge selection When LBaaS attempts to find an Edge which can host a loadbalancer, it fails when a network is attached to a VDR, since VDRs have no router_type attribute. Change-Id: Ib54728158d438fc0284756d20e8e5e28ddd60986 --- vmware_nsx/services/lbaas/nsx_v/lbaas_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py b/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py index 7305efea18..dcf4ab0767 100644 --- a/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py +++ b/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py @@ -46,7 +46,7 @@ def get_lbaas_edge_id_for_subnet(context, plugin, subnet_id, tenant_id): for attached_router in attached_routers: router = plugin.get_router(context, attached_router['device_id']) - if router['router_type'] == 'exclusive': + if router.get('router_type') == 'exclusive': rtr_bindings = nsxv_db.get_nsxv_router_binding(context.session, router['id']) return rtr_bindings['edge_id']