diff options
author | Markos Chandras <mchandras@suse.de> | 2017-03-29 15:40:03 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2017-03-29 15:42:32 +0100 |
commit | 4b89b339fc24c16955af03e7cb06fc21c48942d1 (patch) | |
tree | 2985c2782d9b8477d5714a64837165ca707af1f9 /prototypes | |
parent | 64269605aee34dc885191411ca09da9433e7d51b (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 'prototypes')
-rwxr-xr-x | prototypes/bifrost/scripts/destroy-env.sh | 3 | ||||
-rwxr-xr-x | prototypes/xci/xci-deploy.sh | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/prototypes/bifrost/scripts/destroy-env.sh b/prototypes/bifrost/scripts/destroy-env.sh index ce9d53538..d570f10ad 100755 --- a/prototypes/bifrost/scripts/destroy-env.sh +++ b/prototypes/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 diff --git a/prototypes/xci/xci-deploy.sh b/prototypes/xci/xci-deploy.sh index 326d659d4..277206dc7 100755 --- a/prototypes/xci/xci-deploy.sh +++ b/prototypes/xci/xci-deploy.sh @@ -40,7 +40,7 @@ echo "-------------------------------------------------------------------------" #------------------------------------------------------------------------------- echo "Info: Cleaning up the previous deployment" $XCI_PATH/../bifrost/scripts/destroy-env.sh > /dev/null 2>&1 -/bin/rm -rf /opt/releng /opt/bifrost /opt/openstack-ansible /opt/stack +/bin/rm -rf /opt/releng /opt/bifrost /opt/openstack-ansible #------------------------------------------------------------------------------- # Clone the repositories and checkout the versions |