X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fclean.sh;h=fba1f12674893fb08f77ff3577f03718f781f895;hb=55e3a45da905d5c23079d693d8dd0f7a5fd5c553;hp=262e74bfd454e43e63768c1ab69cc960e0b9dee0;hpb=a19cf619b0ca81db662b1167a94350f6c72c8220;p=apex.git diff --git a/ci/clean.sh b/ci/clean.sh index 262e74bf..fba1f126 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -12,19 +12,6 @@ #author: Dan Radez (dradez@redhat.com) #author: Tim Rozet (trozet@redhat.com) -# Backwards compat for old ENV Vars -# Remove in E Release -if [ -n "$CONFIG" ]; then - echo -e "${red}WARNING: ENV var CONFIG is Deprecated, please unset CONFIG and export BASE in its place${reset}" - echo -e "${red}WARNING: CONFIG will be removed in E${reset}" - BASE=$CONFIG -fi -if [ -n "$RESOURCES" ]; then - echo -e "${red}WARNING: ENV var RESOURCES is Deprecated, please unset RESOURCES and export IMAGES in its place${reset}" - echo -e "${red}WARNING: RESOURCES will be removed in E${reset}" - IMAGES=$RESOURCES -fi - # Use default if no param passed BASE=${BASE:-'/var/opt/opnfv'} IMAGES=${IMAGES:-"$BASE/images"} @@ -102,7 +89,7 @@ fi # Clean off instack/undercloud VM for vm in instack undercloud; do virsh destroy $vm 2> /dev/null | xargs echo -n - virsh undefine $vm 2> /dev/null | xargs echo -n + virsh undefine --nvram $vm 2> /dev/null | xargs echo -n /usr/bin/touch /var/lib/libvirt/images/${vm}.qcow2 virsh vol-delete ${vm}.qcow2 --pool default 2> /dev/null | xargs echo -n rm -f /var/lib/libvirt/images/${vm}.qcow2 2> /dev/null @@ -115,6 +102,7 @@ for i in $(seq 0 $vm_index); do /usr/bin/touch /var/lib/libvirt/images/baremetal${i}.qcow2 virsh vol-delete baremetal${i}.qcow2 --pool default 2> /dev/null | xargs echo -n rm -f /var/lib/libvirt/images/baremetal${i}.qcow2 2> /dev/null + if [ -e /root/.vbmc/baremetal$i ]; then vbmc delete baremetal$i; fi done for network in ${OPNFV_NETWORK_TYPES}; do @@ -132,7 +120,6 @@ done # clean pub keys from root's auth keys sed -i '/stack@undercloud.localdomain/d' /root/.ssh/authorized_keys -sed -i '/virtual-power-key/d' /root/.ssh/authorized_keys # force storage cleanup