diff --git a/ocp_cleanup.sh b/ocp_cleanup.sh index 071d61684..5914e6fc2 100755 --- a/ocp_cleanup.sh +++ b/ocp_cleanup.sh @@ -49,6 +49,12 @@ for vm in $(sudo virsh list --all --name | grep "^${CLUSTER_NAME}.*bootstrap"); sudo virsh destroy $vm sudo virsh undefine $vm --remove-all-storage done + +# For some reason --remove-all-storage doesn't actually remove the storage... +if [ -d /var/lib/libvirt/openshift-images ]; then + sudo rm -fr /var/lib/libvirt/openshift-images/${CLUSTER_NAME}-* +fi + # The .ign volume isn't deleted via --remove-all-storage VOLS="$(sudo virsh vol-list --pool default | awk '{print $1}' | grep "^${CLUSTER_NAME}.*bootstrap")" for v in $VOLS; do