diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-04-29 14:23:36 +0100 |
---|---|---|
committer | Martin Klozik <martinx.klozik@intel.com> | 2016-05-04 09:29:30 +0100 |
commit | 824d9c5d537916ebb1aebf1cfb6de9ab64484246 (patch) | |
tree | 5568133a2c095deed5940f3a069ca1cd983c7789 /core | |
parent | 25969600ac9508ecc54a25d7b0f628e0713a82a2 (diff) |
bugfix: Graceful shutdown of VM - improvement
Cleanup phase of PVVP scenario sometimes causes server reboot.
Following updates were made to prevent reboots:
* better generic process termination procedure
* ovsdb is terminated after vswitchd termination
* vswitchd is terminated directly instead of parent sudo process
* already running VNFs are terminated in case of failure during
VNF start()
Change-Id: Ic09d60d7bfdea01c84a2685ede3d0316f0d09be7
JIRA: VSPERF-271
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/vnf_controller.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/vnf_controller.py b/core/vnf_controller.py index 39a63044..8800ccaf 100644 --- a/core/vnf_controller.py +++ b/core/vnf_controller.py @@ -15,6 +15,7 @@ """ import logging +import pexpect from vnfs.vnf.vnf import IVnf class VnfController(object): @@ -68,8 +69,12 @@ class VnfController(object): """ self._logger.debug('start ' + str(len(self._vnfs)) + ' VNF[s] with ' + ' '.join(map(str, self._vnfs))) - for vnf in self._vnfs: - vnf.start() + try: + for vnf in self._vnfs: + vnf.start() + except pexpect.TIMEOUT: + self.stop() + raise def stop(self): """Stops all VNFs set-up by __init__. |