Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ocp_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down