diff --git a/src/config/schema-transformer/to_bgp.py b/src/config/schema-transformer/to_bgp.py index 36dccb4f0f9..b374cc46941 100644 --- a/src/config/schema-transformer/to_bgp.py +++ b/src/config/schema-transformer/to_bgp.py @@ -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: @@ -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, @@ -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)