]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts: Fix cleanup of old libvirt images wip-vagrant-update 875/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 28 Sep 2017 17:23:23 +0000 (13:23 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 28 Sep 2017 17:23:23 +0000 (13:23 -0400)
rm -rf /var/lib/libvirt/images/*.img wasn't working.

We also need to clean up the .disk files that are getting left behind.

Signed-off-by: David Galloway <dgallowa@redhat.com>
scripts/build_utils.sh

index 1e143ff2e391e053fd3fdf8e778e2c572836877d..bf88c335b404885788ec71073a8e111a103da3cd 100644 (file)
@@ -421,7 +421,7 @@ delete_libvirt_vms() {
         sudo virsh undefine $vm || true
     done
     # Clean up any leftover disk images
-    sudo rm -f /var/lib/libvirt/images/*.img
+    sudo find /var/lib/libvirt/images/ -type f -delete
     sudo virsh pool-refresh default || true
 }