NSXv3: Catch backend failure during delete_subnet

This patch log exception due to disable_native_dhcp
in delete_subnet, but does not re-throw it.
So the process can continue.

Change-Id: Iff3fff2c499840be47e847f1bfc2e43b37098a4d
This commit is contained in:
Shih-Hao Li 2016-11-10 16:12:26 -08:00
parent c20d03be7c
commit abe19309ba

View File

@ -1190,7 +1190,12 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
if self._has_single_dhcp_enabled_subnet(context, network):
super(NsxV3Plugin, self).delete_subnet(
context, subnet_id)
self._disable_native_dhcp(context, network['id'])
try:
self._disable_native_dhcp(context, network['id'])
except Exception as e:
LOG.error(_LE("Failed to disable native DHCP for"
"network %(id)s. Exception: %(e)s"),
{'id': network['id'], 'e': e})
return
super(NsxV3Plugin, self).delete_subnet(context, subnet_id)