summaryrefslogtreecommitdiffstats
path: root/ci/clean.sh
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-03-23 14:31:09 -0400
committerDan Radez <dradez@redhat.com>2016-03-24 21:47:25 -0400
commit012f1d08b075ec53d3b1174cfd7a93b246385d08 (patch)
treea4ea79ed5356fba2ce5cd417048fece5cd610918 /ci/clean.sh
parent5f38edb9a96df7d5927d9b91039144bf4d5f0912 (diff)
Renaming Instack to Undercloud
This commit is not backwards compatible with cleaning. VMs named Instack will need to be manually removed. Change-Id: I6829119e43a0a572da07e6d9757c5208c7fe91d4
Diffstat (limited to 'ci/clean.sh')
-rwxr-xr-xci/clean.sh25
1 files changed, 14 insertions, 11 deletions
diff --git a/ci/clean.sh b/ci/clean.sh
index c031e5e4..40ae6edd 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -18,17 +18,20 @@ source $CONFIG/lib/common-functions.sh
vm_index=4
ovs_bridges="br-admin br-private br-public br-storage"
-# Clean off instack VM
-virsh destroy instack 2> /dev/null || echo -n ''
-virsh undefine instack 2> /dev/null || echo -n ''
-if ! virsh vol-delete instack.qcow2 --pool default 2> /dev/null; then
- if [ ! -e /var/lib/libvirt/images/instack.qcow2 ]; then
- /usr/bin/touch /var/lib/libvirt/images/instack.qcow2
- virsh vol-delete instack.qcow2 --pool default
- fi
-fi
-rm -f /var/lib/libvirt/images/instack.qcow2 2> /dev/null
+# Clean off instack/undercloud VM
+for vm in instack undercloud; do
+ virsh destroy $vm 2> /dev/null || echo -n ''
+ virsh undefine $vm 2> /dev/null || echo -n ''
+ if ! virsh vol-delete ${vm}.qcow2 --pool default 2> /dev/null; then
+ if [ ! -e /var/lib/libvirt/images/${vm}.qcow2 ]; then
+ /usr/bin/touch /var/lib/libvirt/images/${vm}.qcow2
+ virsh vol-delete ${vm}.qcow2 --pool default
+ fi
+ fi
+done
+
+rm -f /var/lib/libvirt/images/undercloud.qcow2 2> /dev/null
# Clean off baremetal VMs in case they exist
for i in $(seq 0 $vm_index); do
@@ -49,7 +52,7 @@ for bridge in ${ovs_bridges}; do
done
# clean pub keys from root's auth keys
-sed -i '/stack@instack.localdomain/d' /root/.ssh/authorized_keys
+sed -i '/stack@undercloud.localdomain/d' /root/.ssh/authorized_keys
sed -i '/virtual-power-key/d' /root/.ssh/authorized_keys