diff options
-rwxr-xr-x | bifrost/scripts/destroy-env.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh index c75e814b..87f792a5 100755 --- a/bifrost/scripts/destroy-env.sh +++ b/bifrost/scripts/destroy-env.sh @@ -25,6 +25,12 @@ for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do virsh undefine $vm || true vbmc delete $vm done +# Destroy all XCI VMs if the previous operation failed +[[ -n ${XCI_FLAVOR} ]] && \ + for vm in ${TEST_VM_NODE_NAMES}; do + virsh destroy $vm || true + virsh undefine $vm || true + done service ironic-conductor stop || true |