Merge "Revert "Ensure namespace network resources are deleted even on subnet not found""

This commit is contained in:
Zuul 2020-02-14 20:29:36 +00:00 committed by Gerrit Code Review
commit d2d08feb08
1 changed files with 5 additions and 11 deletions

View File

@ -102,17 +102,11 @@ class NamespacePodSubnetDriver(default_subnet.DefaultPodSubnetDriver):
# or subnet is already detached. # or subnet is already detached.
LOG.debug(e.message) LOG.debug(e.message)
pass pass
except os_exc.SDKException as e: except os_exc.SDKException:
# FIXME(maysams): Rely only on the NotFoundException handling LOG.exception("Error deleting subnet %(subnet)s from router "
# when the bug fixed at 704998 is merged. "%(router)s.",
if "could not be found" in str(e.message): {'subnet': subnet_id, 'router': router_id})
LOG.debug(e.message) raise
else:
LOG.exception(
"Error deleting subnet %(subnet)s from router "
"%(router)s.", {'subnet': subnet_id, 'router':
router_id})
raise
try: try:
os_net.delete_network(net_id) os_net.delete_network(net_id)