Merge "Cleanup container script improvement"

This commit is contained in:
Jenkins 2016-10-13 15:30:36 +00:00 committed by Gerrit Code Review
commit 086eb5fb2f
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
---
- name: Destroying all Kolla containers and volumes
- name: Destroying all Kolla containers and volumes on compute node
environment:
COMPUTE: true
command: /tmp/kolla-cleanup/tools/cleanup-containers
when: inventory_hostname in groups['compute']
- name: Destroying all Kolla containers and volumes on non compute node
command: /tmp/kolla-cleanup/tools/cleanup-containers
when: inventory_hostname not in groups['compute']

View File

@ -1,5 +1,5 @@
#!/bin/bash
if [[ $(pgrep qemu) ]]; then
if [[ $COMPUTE ]] && [[ $(pgrep qemu) ]]; 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."