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
This commit is contained in:
parent
40e768ec2a
commit
d5fe8a30f9
@ -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
|
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']
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [[ $(pgrep qemu) ]]; then
|
if [[ $COMPUTE ]] && [[ $(pgrep qemu) ]]; then
|
||||||
echo "Some qemu processes were detected."
|
echo "Some qemu processes were detected."
|
||||||
echo "Docker will not be able to stop the nova_libvirt container with those running."
|
echo "Docker will not be able to stop the nova_libvirt container with those running."
|
||||||
echo "Please clean them up before rerunning this script."
|
echo "Please clean them up before rerunning this script."
|
||||||
|
Loading…
Reference in New Issue
Block a user