NSX|V3+P: allow network deletion in case DHCP port not found

Change-Id: I3b924a78d5209bfb60f80a86b57ff64a72b947ea
This commit is contained in:
asarfaty 2020-03-31 15:30:06 +02:00 committed by Adit Sarfaty
parent db659f9cb8
commit 94de675e40
1 changed files with 4 additions and 2 deletions

View File

@ -1657,8 +1657,10 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
context.session, dhcp_service['port_id'])
self._cleanup_port(context, dhcp_service['port_id'],
nsx_port_id)
except nsx_lib_exc.ResourceNotFound:
# This could happen when the port has been manually deleted.
except (nsx_lib_exc.ResourceNotFound, n_exc.NotFound):
# This could happen when the port has been manually deleted
# from the NSX, or when the neutron port deletion previously
# failed
LOG.error("Failed to delete DHCP port %(port)s for "
"network %(network)s",
{'port': dhcp_service['port_id'],