summaryrefslogtreecommitdiffstats
path: root/xci/files/xci-destroy-env.sh
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-08-10 13:14:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-08-10 13:14:38 +0000
commit8d00a12b591028e57037dee8a7d598f8f155d421 (patch)
tree5b4206fe686424cc637620707abd6d5eebb8957b /xci/files/xci-destroy-env.sh
parent46be526924d71cf4acc0531e7c0f052fec0bd4f9 (diff)
parent37c164735db1e84e1b228c15c94ff165d67c201b (diff)
Merge changes from topic 'extend-suse-support-id-skip-verify'
* changes: xci: xci-destroy-env.sh: Update virtualbmc path xci: create-vm-nodes: Install virtualbmc in the XCI virtualenv xci: osa: Drop openSUSE mirror variables
Diffstat (limited to 'xci/files/xci-destroy-env.sh')
-rwxr-xr-xxci/files/xci-destroy-env.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/xci/files/xci-destroy-env.sh b/xci/files/xci-destroy-env.sh
index c95ea838..6c146b0a 100755
--- a/xci/files/xci-destroy-env.sh
+++ b/xci/files/xci-destroy-env.sh
@@ -24,17 +24,15 @@ rm -rf ${HOME}/.ansible
# Wipe repos
rm -rf ${XCI_CACHE}/repos
-# bifrost installs everything on venv so we need to look there if virtualbmc is not installed on the host.
-if which vbmc &>/dev/null || { [[ -e ${XCI_VENV}/bifrost/bin/activate ]] && source ${XCI_VENV}/bifrost/bin/activate; }; then
+if which ${XCI_VENV}/bin/vbmc &>/dev/null; then
# Delete all libvirt VMs and hosts from vbmc (look for a port number)
- for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
+ for vm in $(${XCI_VENV}/bin/vbmc list | awk '/[0-9]/{{ print $2 }}'); do
if which virsh &>/dev/null; then
- virsh destroy $vm &>/dev/null || true
- virsh undefine $vm &>/dev/null || true
+ virsh destroy $vm || true
+ virsh undefine $vm || true
fi
- vbmc delete $vm
+ ${XCI_VENV}/bin/vbmc delete $vm
done
- which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; }
fi
# Destroy all XCI VMs on all flavors
@@ -42,8 +40,8 @@ for varfile in ${flavors[@]}; do
source ${XCI_PATH}/xci/config/${varfile}-vars
for vm in ${NODE_NAMES}; do
if which virsh &>/dev/null; then
- virsh destroy $vm &>/dev/null || true
- virsh undefine $vm &>/dev/null || true
+ virsh destroy $vm &> /dev/null || true
+ virsh undefine $vm &> /dev/null || true
fi
done
done
@@ -84,5 +82,7 @@ service ironic-conductor start || true
service ironic-inspector restart || true
rm -rf ${XCI_VENV}
+# We also need to clear up previous vbmc config dirs
+rm -r ${HOME}/.vbmc
# vim: set ts=4 sw=4 expandtab: