aboutsummaryrefslogtreecommitdiff
path: root/tools/cleanup-containers
diff options
context:
space:
mode:
authorEduardo Gonzalez <dabarren@gmail.com>2017-02-02 09:49:12 +0000
committerEduardo Gonzalez <dabarren@gmail.com>2017-02-02 09:49:12 +0000
commit1a54266029b256d451c542be0534fc549bdf72a4 (patch)
treec8674664448893eb78377d3fb3dc19ad717bf653 /tools/cleanup-containers
parent485ded5ba3d7f9834f7f0b0a5e085ed5211c233f (diff)
downloadkolla-ansible-1a54266029b256d451c542be0534fc549bdf72a4.tar.gz
kolla-ansible-1a54266029b256d451c542be0534fc549bdf72a4.zip
Ignore qemu-img process in cleanup-containers
Change-Id: I059b0aafbf93cf8c131beba47ca6f6718ec5fb36 Closes-Bug: #1586548
Diffstat (limited to 'tools/cleanup-containers')
-rwxr-xr-xtools/cleanup-containers2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/cleanup-containers b/tools/cleanup-containers
index 612b34a62..b48c2fc84 100755
--- a/tools/cleanup-containers
+++ b/tools/cleanup-containers
@@ -2,7 +2,7 @@
containers_running=$(docker ps --filter "label=kolla_version" --format "{{.Names}}")
-QEMU_PIDS=$(pgrep -l qemu | awk '!/qemu-ga/ {print $1}')
+QEMU_PIDS=$(pgrep -l qemu | awk '!/qemu-ga/ && !/qemu-img/ {print $1}')
if [[ "${containers_running}" =~ "nova_libvirt" ]] && [[ $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."