summaryrefslogtreecommitdiffstats
path: root/vnfs
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-04-14 20:18:16 +0100
committerMartin Klozik <martinx.klozik@intel.com>2016-04-19 13:06:48 +0100
commitc7cc50cea185a2eb4b26958c985fb8c8fdfd9439 (patch)
tree91c3f8f5793ee1beb47b800881c407af81576274 /vnfs
parent55db32610210f3163971557382e653be6667e333 (diff)
bugfix: Graceful shutdown of VM
Cleanup phase of PVVP scenario sometimes causes server reboot. Following updates were made to prevent reboots: * sleep after VM OS shutdown allows QEMU to finish its own shutdown procedure * shared dir was mounted as read only to prevent its modification, which sometimes causes delays during shutdown; Also warning messages are causing CI jobs failures. Change-Id: I1607e79beeee343893496efe01ca0be5ea684a9d JIRA: VSPERF-271 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'vnfs')
-rw-r--r--vnfs/qemu/qemu.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py
index 9cb23ac6..686fb431 100644
--- a/vnfs/qemu/qemu.py
+++ b/vnfs/qemu/qemu.py
@@ -20,6 +20,7 @@ import logging
import locale
import re
import subprocess
+import time
from conf import settings as S
from conf import get_test_param
@@ -139,6 +140,8 @@ class IVnfQemu(IVnf):
# turn off VM
self.execute_and_wait('poweroff', 120, "Power down")
+ # VM OS is off, but wait until qemu shutdowns
+ time.sleep(2)
# just for case that graceful shutdown failed
super(IVnfQemu, self).stop()
@@ -257,14 +260,15 @@ class IVnfQemu(IVnf):
Mount shared directory and copy DPDK and l2fwd sources
"""
# mount shared directory
- self.execute_and_wait('umount ' + S.getValue('OVS_DPDK_SHARE'))
+ self.execute_and_wait('umount /dev/sdb1')
self.execute_and_wait('rm -rf ' + S.getValue('GUEST_OVS_DPDK_DIR'))
self.execute_and_wait('mkdir -p ' + S.getValue('OVS_DPDK_SHARE'))
- self.execute_and_wait('mount -o iocharset=utf8 /dev/sdb1 ' +
+ self.execute_and_wait('mount -o ro,iocharset=utf8 /dev/sdb1 ' +
S.getValue('OVS_DPDK_SHARE'))
self.execute_and_wait('mkdir -p ' + S.getValue('GUEST_OVS_DPDK_DIR'))
self.execute_and_wait('cp -ra ' + os.path.join(S.getValue('OVS_DPDK_SHARE'), dirname) +
' ' + S.getValue('GUEST_OVS_DPDK_DIR'))
+ self.execute_and_wait('umount /dev/sdb1')
def _configure_disable_firewall(self):
"""