aboutsummaryrefslogtreecommitdiff
path: root/tools/cleanup-containers
diff options
context:
space:
mode:
authorBorne Mace <borne.mace@oracle.com>2016-11-17 10:42:46 -0800
committerBorne Mace <borne.mace@oracle.com>2016-11-23 14:26:57 -0800
commiteb138539f2dc4ff146ddb57ca3aa0a0acc111b55 (patch)
tree106d183e7791a390543952b4596e45648ab3dbda /tools/cleanup-containers
parent43517f48f5ab2b9d8fb22dc2a619b8d9f4f494d0 (diff)
downloadkolla-ansible-eb138539f2dc4ff146ddb57ca3aa0a0acc111b55.tar.gz
kolla-ansible-eb138539f2dc4ff146ddb57ca3aa0a0acc111b55.zip
Ignore dom0 qemu processes during destroy
Updates cleanup-containers to disclude lines related to dom0 qemu processes. Change-Id: I0b71ed29b9a2f239ebfdaa66b7cbe41eeaf2773c Partially-Implements: blueprint xen-hypervisor-support
Diffstat (limited to 'tools/cleanup-containers')
-rwxr-xr-xtools/cleanup-containers3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cleanup-containers b/tools/cleanup-containers
index c73d197dd..a07c1d4d1 100755
--- a/tools/cleanup-containers
+++ b/tools/cleanup-containers
@@ -1,5 +1,6 @@
#!/bin/bash
-if [[ $COMPUTE ]] && [[ $(pgrep qemu) ]]; then
+QEMU_PIDS=$(pgrep qemu)
+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."
echo "Please clean them up before rerunning this script."