Fix cleanup-containers

qemu-ga should be excluded

Change-Id: I89474758a45e52c6c2da7307764344863e065aed
Closes-Bug: #1655838
This commit is contained in:
caowei 2017-01-12 14:29:50 +08:00
parent adaabb9c4d
commit 1063f73620

View File

@ -1,5 +1,5 @@
#!/bin/bash
QEMU_PIDS=$(pgrep qemu)
QEMU_PIDS=$(pgrep -l qemu | awk '!/qemu-ga/ {print $1}')
if [[ $COMPUTE ]] && [[ $QEMU_PIDS ]] && [[ $(ps --no-headers wwwup $QEMU_PIDS | grep --invert-match '\-xen\-domid 0') ]]; then
echo "Some qemu processes were detected."
echo "Docker will not be able to stop the nova_libvirt container with those running."