Ensure docker running before execute the destroy action
Before cleanup containers and hosts, it should be ensure the docker serivce running but the destroy action missing it, this patch to fix it Change-Id: I85ca806c1fd395daf937b585d466e16fbad4e20c Closes-Bug: #1741852
This commit is contained in:
parent
1b70a37db1
commit
8cb57f54fa
@ -1,6 +1,8 @@
|
|||||||
---
|
---
|
||||||
- include: copy_tools.yml
|
- include: copy_tools.yml
|
||||||
|
|
||||||
|
- include: validate_docker_execute.yml
|
||||||
|
|
||||||
- include: cleanup_containers.yml
|
- include: cleanup_containers.yml
|
||||||
|
|
||||||
- include: cleanup_images.yml
|
- include: cleanup_images.yml
|
||||||
|
3
ansible/roles/destroy/tasks/validate_docker_execute.yml
Normal file
3
ansible/roles/destroy/tasks/validate_docker_execute.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure the docker service is running
|
||||||
|
command: /tmp/kolla-cleanup/tools/validate-docker-execute.sh
|
@ -4,8 +4,6 @@
|
|||||||
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
||||||
cd "$(dirname "$REAL_PATH")/.."
|
cd "$(dirname "$REAL_PATH")/.."
|
||||||
|
|
||||||
. tools/validate-docker-execute.sh
|
|
||||||
|
|
||||||
function process_cmd {
|
function process_cmd {
|
||||||
if [[ -z "$KOLLA_IMAGES" ]]; then
|
if [[ -z "$KOLLA_IMAGES" ]]; then
|
||||||
echo "No images to cleanup, exit now."
|
echo "No images to cleanup, exit now."
|
||||||
|
Loading…
Reference in New Issue
Block a user