From c8ae461154f43907a36f06fd1858228c18824315 Mon Sep 17 00:00:00 2001 From: Anna Khmelnitsky Date: Mon, 3 Apr 2017 13:50:30 -0700 Subject: [PATCH] NSXv3: Force delete router Router created under protected identity can not be modified on the backend directly. However, ports can be added to this router directly on the backend, in which case openstack will no longer be able to delete the router, since it has associated ports. This change fixes the issue by adding ?force=true to router deletion. Change-Id: Ia816b1dfa770bb0bded9677dd1a0cbd094a59ebc --- 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 a4a005b71a..b1ba81c74f 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -2769,7 +2769,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, # It is safe to do now as db-level checks for resource deletion were # passed (and indeed the resource was removed from the Neutron DB try: - self._router_client.delete(nsx_router_id) + self._router_client.delete(nsx_router_id, force=True) except nsx_lib_exc.ResourceNotFound: # If the logical router was not found on the backend do not worry # about it. The conditions has already been logged, so there is no