mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
maintenance: remove pools and volumes
This will clean up all volumes under all non-default pools. The openshift CI creates a pool for each cluster. Signed-off-by: Christy Norman <christy@linux.vnet.ibm.com>
This commit is contained in:
@@ -9,7 +9,6 @@ then
|
||||
fi
|
||||
|
||||
CONNECT="${CONNECT:=qemu:///system}"
|
||||
POOL="${POOL:=default}"
|
||||
|
||||
run()
|
||||
{
|
||||
@@ -23,13 +22,18 @@ do
|
||||
run virsh -c "${CONNECT}" undefine "${DOMAIN}"
|
||||
done
|
||||
|
||||
virsh -c "${CONNECT}" vol-list "${POOL}" | tail -n +3 | while read -r VOLUME _
|
||||
for POOL in $(virsh -c "${CONNECT}" pool-list --all --name)
|
||||
do
|
||||
if test -z "${VOLUME}"
|
||||
then
|
||||
continue
|
||||
fi
|
||||
run virsh -c "${CONNECT}" vol-delete --pool "${POOL}" "${VOLUME}"
|
||||
virsh -c "${CONNECT}" vol-list "${POOL}" | tail -n +3 | while read -r VOLUME _
|
||||
do
|
||||
if test -z "${VOLUME}"
|
||||
then
|
||||
continue
|
||||
fi
|
||||
run virsh -c "${CONNECT}" vol-delete --pool "${POOL}" "${VOLUME}"
|
||||
done
|
||||
run virsh -c "${CONNECT}" pool-destroy "${POOL}"
|
||||
run virsh -c "${CONNECT}" pool-undefine "${POOL}"
|
||||
done
|
||||
|
||||
for NET in $(virsh -c "${CONNECT}" net-list --all --name)
|
||||
|
||||
Reference in New Issue
Block a user