X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fodl-openstack-cleanup-stale-volumes.sh;h=3745eb25349b2974d1f0f65e05d044da6a46d19d;hb=5f732f7ea41a3a88067f8364835fd44e3f69bb34;hp=df1995b7dcf7d31cc0b0e43e90649a5feafe44a2;hpb=cce3643d9d197693590037f4c3745eb9613f7b3d;p=releng%2Fbuilder.git diff --git a/jjb/odl-openstack-cleanup-stale-volumes.sh b/jjb/odl-openstack-cleanup-stale-volumes.sh index df1995b7d..3745eb253 100644 --- a/jjb/odl-openstack-cleanup-stale-volumes.sh +++ b/jjb/odl-openstack-cleanup-stale-volumes.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2018 The Linux Foundation and others. @@ -10,10 +10,7 @@ ############################################################################## # Scans OpenStack for orphaned volumes -# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091 -source "/tmp/v/openstack/bin/activate" mapfile -t os_volumes < <(openstack volume list -f value -c ID --status Available) -deactivate echo "---> Orphaned volumes" if [ ${#os_volumes[@]} -eq 0 ]; then @@ -24,4 +21,3 @@ else lftools openstack --os-cloud vex volume remove --minutes 15 "$volume" done fi -deactivate