Touch baremetal images before vol-delete 51/8451/1
authorMichael Chapman <woppin@gmail.com>
Fri, 29 Jan 2016 10:01:07 +0000 (21:01 +1100)
committerMichael Chapman <woppin@gmail.com>
Fri, 29 Jan 2016 10:01:07 +0000 (21:01 +1100)
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

ci/clean.sh

index 8b0c9bb..f05b913 100755 (executable)
@@ -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