Skip to content

Commit

Permalink
Merge "Catch all exceptions in reinit phase"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 17, 2015
2 parents e023e96 + 77ec82f commit 67164f6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/config/schema-transformer/to_bgp.py
Expand Up @@ -2745,10 +2745,9 @@ def reinit(self):
if ri.parent_uuid not in vn_id_list:
delete = True
else:
ri_name = ri.get_fq_name()[-1]
# if the RI was for a service chain and service chain no
# longer exists, delete the RI
sc_id = VirtualNetworkST._get_service_id_from_ri(ri_name)
sc_id = VirtualNetworkST._get_service_id_from_ri(ri.name)
if sc_id and sc_id not in ServiceChain:
delete = True
else:
Expand All @@ -2759,6 +2758,11 @@ def reinit(self):
ri_obj.delete()
except NoIdError:
pass
except Exception as e:
_sandesh._logger.error(
"Error while deleting routing instance %s: %s",
ri.get_fq_name_str(), str(e))

# end for ri

sg_list = _vnc_lib.security_groups_list(detail=True,
Expand Down Expand Up @@ -2787,6 +2791,10 @@ def reinit(self):
_vnc_lib.access_control_list_delete(id=acl.uuid)
except NoIdError:
pass
except Exception as e:
_sandesh._logger.error(
"Error while deleting acl %s: %s",
acl.uuid, str(e))
# end for acl

gevent.sleep(0.001)
Expand Down

0 comments on commit 67164f6

Please sign in to comment.