From 4538a7e08306da73d446aa07ba76d10c73341969 Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Mon, 23 Oct 2017 10:38:38 -0500 Subject: [PATCH] Specify containers to destroy Allows the operator to specify the containers to destroy or exclude. Change-Id: If1b72fd8bdf790184579130aa4b44221b339a41f --- leap-upgrades/lib/vars.sh | 3 +++ leap-upgrades/re-deploy.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/leap-upgrades/lib/vars.sh b/leap-upgrades/lib/vars.sh index a8fa2ee9..b63b31a9 100644 --- a/leap-upgrades/lib/vars.sh +++ b/leap-upgrades/lib/vars.sh @@ -48,3 +48,6 @@ export BOOTSTRAP_ANSIBLE_FOLDER=${BOOTSTRAP_ANSIBLE_FOLDER:-/opt/openstack-ansib ## Ansible debugging export LEAP_TIMESTAMP=$(date +%s) export ANSIBLE_LOG_PATH="/opt/leap42/ansible-${LEAP_TIMESTAMP}.log" + +## Containers List to Destroy in destroy-old-containers.yml +export CONTAINERS_TO_DESTROY='"'"${CONTAINERS_TO_DESTROY:-all_containers:!galera_all:!neutron_agent:!ceph_all:!rsyslog_all}"'"' diff --git a/leap-upgrades/re-deploy.sh b/leap-upgrades/re-deploy.sh index 0711e3e2..73974f0a 100755 --- a/leap-upgrades/re-deploy.sh +++ b/leap-upgrades/re-deploy.sh @@ -61,7 +61,7 @@ RUN_TASKS+=("${UPGRADE_UTILS}/pip-unify.yml -e release_version=\"${NEWTON_RELEAS RUN_TASKS+=("${UPGRADE_UTILS}/db-stop.yml") RUN_TASKS+=("${UPGRADE_UTILS}/ansible_fact_cleanup.yml") # Physical host cleanup -RUN_TASKS+=("${UPGRADE_UTILS}/destroy-old-containers.yml") +RUN_TASKS+=("${UPGRADE_UTILS}/destroy-old-containers.yml -e 'destroy_hosts='${CONTAINERS_TO_DESTROY}''") # Permissions for qemu save, because physical host cleanup RUN_TASKS+=("${UPGRADE_UTILS}/nova-libvirt-fix.yml")