diff options
Diffstat (limited to 'bifrost')
-rwxr-xr-x | bifrost/scripts/bifrost-provision.sh | 2 | ||||
-rwxr-xr-x | bifrost/scripts/destroy-env.sh | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/bifrost/scripts/bifrost-provision.sh b/bifrost/scripts/bifrost-provision.sh index df05c7ce..d4d1f96a 100755 --- a/bifrost/scripts/bifrost-provision.sh +++ b/bifrost/scripts/bifrost-provision.sh @@ -16,7 +16,7 @@ BIFROST_HOME=$SCRIPT_HOME/.. ANSIBLE_INSTALL_ROOT=${ANSIBLE_INSTALL_ROOT:-/opt/stack} ENABLE_VENV="false" USE_DHCP="false" -USE_VENV="true" +USE_VENV="false" BUILD_IMAGE=true PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600} diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh index 87f792a5..f6eca4e3 100755 --- a/bifrost/scripts/destroy-env.sh +++ b/bifrost/scripts/destroy-env.sh @@ -19,12 +19,17 @@ rm -rf /opt/stack # HOME is normally set by sudo -H rm -rf ${HOME}/.config/openstack -# Delete all libvirt VMs and hosts from vbmc (look for a port number) -for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do - virsh destroy $vm || true - virsh undefine $vm || true - vbmc delete $vm -done +# 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 /opt/stack/bifrost/bin/activate ]] && source /opt/stack/bifrost/bin/activate; }; 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 + virsh destroy $vm || true + virsh undefine $vm || true + vbmc delete $vm + done + which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; } +fi + # Destroy all XCI VMs if the previous operation failed [[ -n ${XCI_FLAVOR} ]] && \ for vm in ${TEST_VM_NODE_NAMES}; do |