From bdbe67a683efe5d0d61d9d2e04a9104ccfca715a Mon Sep 17 00:00:00 2001 From: Rajesh Velandy Date: Mon, 24 Oct 2016 21:34:37 +0000 Subject: [PATCH] Bug 92 - Catch Termination error and decrement descriptor use count Signed-off-by: Rajesh Velandy --- .../plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py index cf038578..79b004fe 100755 --- a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py +++ b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsmtasklet.py @@ -4097,7 +4097,10 @@ class NsManager(object): # Terminate the instances/networks assocaited with this nw service self._log.debug("Terminating the network service %s", nsr_id) - yield from self._nsrs[nsr_id].terminate() + try : + yield from self._nsrs[nsr_id].terminate() + except Exception as e: + self.log.exception("Failed to terminate NSR[id=%s]", nsr_id) # Unref the NSD yield from self.nsd_unref_by_nsr_id(nsr_id) -- 2.25.1