Merge "Update Fl multipatch build used in RPM full verify"
[releng/builder.git] / jjb / odl-openstack-cleanup-orphaned-nodes.sh
index 1b7f0c68e47389c6ab0d7cd2f2d63f12bf48b0f2..df598b473d83eba76ae30b3803f28df1afadfe3d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 - 2018 The Linux Foundation and others.
@@ -43,22 +43,14 @@ minion_in_jenkins() {
 # Fetch server list before fetching active minions to minimize race condition
 # where we might be trying to delete servers while jobs are trying to start
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-
 # We purposely need word splitting here to create the OS_SERVERS array.
 # shellcheck disable=SC2207
 mapfile -t OS_SERVERS < <(openstack server list -f value -c "Name" | grep -E 'prd|snd')
 
-deactivate
-
 #############################
 ## DELETE ORPHANED SERVERS ##
 #############################
 
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source "/tmp/v/lftools/bin/activate"
-
 # Search for servers that are not in use by either releng or sandbox silos and
 # delete them.
 for server in "${OS_SERVERS[@]}"; do
@@ -74,5 +66,3 @@ for server in "${OS_SERVERS[@]}"; do
             server remove --minutes 15 "$server"
     fi
 done
-
-deactivate