summaryrefslogtreecommitdiffstats
path: root/xci/files/xci-destroy-env.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xci/files/xci-destroy-env.sh')
-rwxr-xr-xxci/files/xci-destroy-env.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/xci/files/xci-destroy-env.sh b/xci/files/xci-destroy-env.sh
index 9d53dc15..8b811d0f 100755
--- a/xci/files/xci-destroy-env.sh
+++ b/xci/files/xci-destroy-env.sh
@@ -14,6 +14,8 @@ if [[ $(whoami) != "root" ]]; then
exit 1
fi
+flavors=(aio mini noha ha)
+
# Start fresh
rm -rf /opt/stack
# HOME is normally set by sudo -H
@@ -33,14 +35,16 @@ if which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && sourc
which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; }
fi
-# Destroy all XCI VMs if the previous operation failed
-[[ -n ${XCI_FLAVOR} ]] && \
+# Destroy all XCI VMs on all flavors
+for varfile in ${flavors[@]}; do
+ source ${XCI_PATH}/xci/config/${varfile}-vars
for vm in ${TEST_VM_NODE_NAMES}; do
if which virsh &>/dev/null; then
virsh destroy $vm || true
virsh undefine $vm || true
fi
done
+done
service ironic-conductor stop || true
@@ -76,3 +80,5 @@ service libvirtd restart
service ironic-api restart || true
service ironic-conductor start || true
service ironic-inspector restart || true
+
+# vim: set ts=4 sw=4 expandtab: