aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorliyingjun <yingjun.li@kylin-cloud.com>2016-10-13 17:31:17 +0800
committerliyingjun <yingjun.li@kylin-cloud.com>2016-10-13 17:31:17 +0800
commitd5fe8a30f98db9c604cf6a80b63875c06abbf20a (patch)
tree4e05b92cfe0082a3f70764d64904cc98c2e7d4cc /ansible
parent40e768ec2a370dc010be773af37e2ce417adda80 (diff)
downloadkolla-d5fe8a30f98db9c604cf6a80b63875c06abbf20a.tar.gz
kolla-d5fe8a30f98db9c604cf6a80b63875c06abbf20a.zip
Cleanup container script improvement
Currently, when there are some qemu processes which may be some useful virtual machines running by the operator running on non compute node, the cleanup script will fail the cleanup operation for that node. We need to ignore the qemu process check for non compute nodes. Change-Id: If49a1a30764063935b2a65312de8f3b2357c7fbc Closes-bug: 1633005
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/destroy/tasks/cleanup_containers.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/ansible/roles/destroy/tasks/cleanup_containers.yml b/ansible/roles/destroy/tasks/cleanup_containers.yml
index 4ccdd9cdd..c6aee8ef5 100644
--- a/ansible/roles/destroy/tasks/cleanup_containers.yml
+++ b/ansible/roles/destroy/tasks/cleanup_containers.yml
@@ -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']