summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chapman <woppin@gmail.com>2016-01-29 21:01:07 +1100
committerMichael Chapman <woppin@gmail.com>2016-01-29 21:01:07 +1100
commite8a74a21aa0e477bdb9293bf37d546412d8427d1 (patch)
tree610bfb05cf87b1598303b3905066407f022dfedf
parentbeafa30495ff06b565a68d6a2771c9116edf7e9f (diff)
Touch baremetal images before vol-delete
Similar to the instack line above, the vol-delete will fail if the baremetal image file is not present. This can happen if the disk runs out of space during copy, for example. Change-Id: Ib3a60dd03c3f7172cb59ade30e745397410e3ef2
-rwxr-xr-xci/clean.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/ci/clean.sh b/ci/clean.sh
index 8b0c9bbc..f05b9136 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -34,6 +34,7 @@ rm -f /var/lib/libvirt/images/instack.qcow2 2> /dev/null
for i in $(seq 0 $vm_index); do
virsh destroy baremetalbrbm_brbm1_brbm2_brbm3_$i 2> /dev/null || echo -n ''
virsh undefine baremetalbrbm_brbm1_brbm2_brbm3_$i --remove-all-storage 2> /dev/null || echo -n ''
+ /usr/bin/touch /var/lib/libvirt/images/baremetalbrbm_brbm1_brbm2_brbm3_${i}.qcow2
virsh vol-delete baremetalbrbm_brbm1_brbm2_brbm3_${i}.qcow2 --pool default 2> /dev/null
rm -f /var/lib/libvirt/images/baremetalbrbm_brbm1_brbm2_brbm3_${i}.qcow2 2> /dev/null
done