From ddb2a7cf9a9c87954dd52a98940e12c4ffaebcfc Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Mon, 8 Jan 2018 02:15:40 -0800 Subject: [PATCH] NSX_V3: ensure that the correct router attributes are read Make sure that the correct router attributes are read. If not a StaleData exception is raised. Change-Id: I58e90a7a361dc7dca1267d62545e838153fe7bec --- vmware_nsx/plugins/nsx_v3/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 6dc1ff6495..6cac134969 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -3309,8 +3309,8 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, context, router['id'], {'router': {az_def.AZ_HINTS: az_hints}}) + router_db = self._get_router(context, r['id']) with db_api.context_manager.writer.using(context): - router_db = self._get_router(context, r['id']) self._process_extra_attr_router_create(context, router_db, r) # Create backend entries here in case neutron DB exception # occurred during super.create_router(), which will cause