X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-get-slave-addresses.sh;h=2546d31f68c819b3315cf640a5d1749d03116286;hb=21b30c84b1abd6b35db2decdb075dfa82f39fed3;hp=4356f5721c84d8625b5ba55cdadf3733a209ac0a;hpb=1a354a5915922fcc6b5e1e5f43a5f312e697a4a4;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-get-slave-addresses.sh b/jjb/integration/integration-get-slave-addresses.sh index 4356f5721..2546d31f6 100644 --- a/jjb/integration/integration-get-slave-addresses.sh +++ b/jjb/integration/integration-get-slave-addresses.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # Get the Controller and Tools VM slave addresses set -x @@ -7,14 +7,8 @@ ODL_SYSTEM=() TOOLS_SYSTEM=() OPENSTACK_SYSTEM=() OPENSTACK_CONTROLLERS=() -[ "$NUM_OPENSTACK_SITES" ] || NUM_OPENSTACK_SITES=1 -OPENSTACK_VENV="/tmp/v/openstack" -# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091 -source $OPENSTACK_VENV/bin/activate -# shellcheck disable=SC2207 -ADDR=($(openstack stack show -f json -c outputs "$STACK_NAME" | \ - jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')) +mapfile -t ADDR <<< "$(openstack stack show -f json -c outputs "$STACK_NAME" | jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')" # The next two blocks of code will parse the list of vm IP's hostnames to determine which type of node # the vm is: odl, devstack controller or compute, ha_proxy or tools. For the odl node's the hsotname will contain @@ -56,7 +50,7 @@ echo "NUM_TOOLS_SYSTEM=${#TOOLS_SYSTEM[@]}" >> slave_addresses.txt #if HA Proxy is requested the last devstack node will be configured as haproxy if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then # HA Proxy is installed on one OPENSTACK_SYSTEM VM on each site - NUM_OPENSTACK_SYSTEM=$(( ${#OPENSTACK_SYSTEM[@]} - NUM_OPENSTACK_SITES )) + NUM_OPENSTACK_SYSTEM=$(( ${#OPENSTACK_SYSTEM[@]} - 1 )) else NUM_OPENSTACK_SYSTEM=${#OPENSTACK_SYSTEM[@]} fi @@ -93,7 +87,7 @@ done openstack_index=0 # Assuming number of openstack control nodes equals number of openstack sites -NUM_OPENSTACK_CONTROL_NODES=$(( NUM_OPENSTACK_SITES )) +NUM_OPENSTACK_CONTROL_NODES=1 echo "NUM_OPENSTACK_CONTROL_NODES=${NUM_OPENSTACK_CONTROL_NODES}" >> slave_addresses.txt for i in $(seq 0 $((NUM_OPENSTACK_CONTROL_NODES - 1))) do