summaryrefslogtreecommitdiffstats
path: root/ci/clean.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-03-28 14:51:30 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-28 14:51:30 +0000
commit78e41283e118e234c8559e8386abaeb19ac30480 (patch)
tree61dcbfd58441364ff3a4800a37dc7eb613ec5624 /ci/clean.sh
parent9d3cab8d46e5823fee43a0b6c2f19d5dccfa4c3a (diff)
parent012f1d08b075ec53d3b1174cfd7a93b246385d08 (diff)
Merge "Renaming Instack to Undercloud"
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