summaryrefslogtreecommitdiffstats
path: root/nfvbench/chain_managers.py
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2017-09-16 00:17:22 -0700
committerahothan <ahothan@cisco.com>2017-09-16 00:17:22 -0700
commite2bf4ed6d951fe9d65b6bf8af8f8dca60ed173c9 (patch)
tree2bfd77144f4a206cefd31519bf70b425c5d0e492 /nfvbench/chain_managers.py
parent836341027030bcb12973cb91f7d1dbdfdb3317d7 (diff)
StatsManager must clean up self when there is an exception in __init__1.0.8
ALso remove unused connection.py Change-Id: I1bf688ade511f2054e9d67edf8938df1988e4cb2 Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench/chain_managers.py')
-rw-r--r--nfvbench/chain_managers.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/nfvbench/chain_managers.py b/nfvbench/chain_managers.py
index fe3a2d4..033eb7a 100644
--- a/nfvbench/chain_managers.py
+++ b/nfvbench/chain_managers.py
@@ -85,8 +85,14 @@ class StatsManager(object):
WORKER_CLASS = self.factory.get_chain_worker(self.specs.openstack.encaps,
self.config.service_chain)
self.worker = WORKER_CLASS(self.config, self.clients, self.specs)
- self.worker.set_vlans(self.vlans)
- self._config_interfaces()
+ try:
+ self.worker.set_vlans(self.vlans)
+ self._config_interfaces()
+ except Exception as exc:
+ # since the wrorker is up and running, we need to close it
+ # in case of exception
+ self.close()
+ raise exc
def _get_data(self):
return self.worker.get_data()