From 824d9c5d537916ebb1aebf1cfb6de9ab64484246 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 29 Apr 2016 14:23:36 +0100 Subject: 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 Reviewed-by: Maryam Tahhan --- vnfs/vnf/vnf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vnfs/vnf/vnf.py') diff --git a/vnfs/vnf/vnf.py b/vnfs/vnf/vnf.py index 3dae2733..1410a0c4 100644 --- a/vnfs/vnf/vnf.py +++ b/vnfs/vnf/vnf.py @@ -51,11 +51,12 @@ class IVnf(tasks.Process): """ Stops VNF instance. """ - self._logger.info('Killing VNF...') + if self.is_running(): + self._logger.info('Killing VNF...') - # force termination of VNF and wait for it to terminate; It will avoid - # sporadic reboot of host. (caused by hugepages or DPDK ports) - super(IVnf, self).kill(signal='-9', sleep=10) + # force termination of VNF and wait for it to terminate; It will avoid + # sporadic reboot of host. (caused by hugepages or DPDK ports) + super(IVnf, self).kill(signal='-9', sleep=10) def execute(self, cmd, delay=0): """ -- cgit 1.2.3-korg