diff options
author | Markos Chandras <mchandras@suse.de> | 2017-03-29 15:40:03 +0100 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-08-11 12:56:12 -0700 |
commit | e32e998cc32bc928034e205c889c8c1aa7f6d914 (patch) | |
tree | 1479ae2f56eb3a86d78410887cfda8c5369be34d /bifrost | |
parent | 8ff8b4a87588b7f72632e30bc7c46745214af3ec (diff) |
prototypes: bifrost: Remove /opt/stack from previous deployments
/opt/stack is being created by bifrost so the destroy-env.sh
script should be responsible for cleaning up all the remnants.
That way we can use the destroy-env.sh script outside of Jenkins
as well.
Change-Id: I72d9737cf2446ff3ffc02f195337a6873eceb5c0
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'bifrost')
-rwxr-xr-x | bifrost/scripts/destroy-env.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh index ce9d5353..d570f10a 100755 --- a/bifrost/scripts/destroy-env.sh +++ b/bifrost/scripts/destroy-env.sh @@ -14,6 +14,9 @@ if [[ $(whoami) != "root" ]]; then exit 1 fi +# Start fresh +rm -rf /opt/stack + # 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 |