summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-02-07 10:35:58 +0100
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commit11191a625d99944cc9c514e9fc97ff3f39665a60 (patch)
treeba146000843f5c891ede0a6d98aa625188c04323
parent67cf85ff01caf65f478fe44631cf0524557a9018 (diff)
bifrost: Destroy all VMs from the slave nodes
New patchsets may introduce (or remove) testing VMs so make sure the script destroys all of them Change-Id: Ic96142823b9a8b044306327ce3454fbdc6fa5eb4 Signed-off-by: Markos Chandras <mchandras@suse.de>
-rwxr-xr-xbifrost/scripts/destroy-env.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh
index 14869b0e..b73092b0 100755
--- a/bifrost/scripts/destroy-env.sh
+++ b/bifrost/scripts/destroy-env.sh
@@ -14,12 +14,12 @@ if [[ $(whoami) != "root" ]]; then
exit 1
fi
-virsh destroy jumphost.opnfvlocal || true
-virsh destroy controller00.opnfvlocal || true
-virsh destroy compute00.opnfvlocal || true
-virsh undefine jumphost.opnfvlocal || true
-virsh undefine controller00.opnfvlocal || true
-virsh undefine compute00.opnfvlocal || true
+# Delete all VMs on the slave since proposed patchsets
+# may leave undesired VM leftovers
+for vm in $(virsh list --all --name); do
+ virsh destroy $vm || true
+ virsh undefine $vm || true
+done
service ironic-conductor stop || true