diff --git a/devstack/tools/nsxp_cleanup.py b/devstack/tools/nsxp_cleanup.py index 0d2b3d7934..a10575eab2 100755 --- a/devstack/tools/nsxp_cleanup.py +++ b/devstack/tools/nsxp_cleanup.py @@ -174,7 +174,7 @@ class NSXClient(object): # remove all nat rules from this router before deletion self.cleanup_tier1_nat_rules(rtr['id']) try: - self.nsxpolicy.tier1.remove_edge_cluster(rtr['id']) + self.nsxpolicy.tier1.delete_locale_service(rtr['id']) except exceptions.ManagerError as e: # Not always exists pass diff --git a/vmware_nsx/plugins/nsx_p/plugin.py b/vmware_nsx/plugins/nsx_p/plugin.py index a20c546cfe..3afc3a5393 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -1643,6 +1643,9 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): router_name, router['id'], tier0=None, tags=tags) + # Also create the empty locale-service as it must always exist + self.nsxpolicy.tier1.create_locale_service(router['id']) + #TODO(annak): narrow down the exception except Exception as ex: with excutils.save_and_reraise_exception(): @@ -1675,6 +1678,7 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): context, router_id) try: + self.nsxpolicy.tier1.delete_locale_service(router_id) self.nsxpolicy.tier1.delete(router_id) except nsx_lib_exc.ResourceNotFound: # If the resource was not found on the backend do not worry about