Skip to content
Snippets Groups Projects
Commit 49206900 authored by Elena Gryaznova's avatar Elena Gryaznova
Browse files

b=16264

i=Adilger
new t-f init clients list fn
parent f1fdfe67
No related branches found
No related tags found
No related merge requests found
......@@ -3,14 +3,8 @@
CLIENT1=${CLIENT1:-`hostname`}
SINGLECLIENT=$CLIENT1
RCLIENTS=${RCLIENTS:-""}
CLIENTS=`comma_list $SINGLECLIENT $RCLIENTS`
REMOTECLIENTS=($RCLIENTS)
for ((i=0; $i<${#REMOTECLIENTS[@]}; i++)); do
varname=CLIENT$((i + 2))
eval $varname=${REMOTECLIENTS[i]}
done
CLIENTCOUNT=$((${#REMOTECLIENTS[@]} + 1))
init_clients_lists
[ -n "$RCLIENTS" -a "$PDSH" = "no_dsh" ] && \
error "tests for remote clients $RCLIENTS needs pdsh != do_dsh " || true
......
......@@ -1806,6 +1806,29 @@ nodes_list () {
echo $myNODES_sort
}
init_clients_lists () {
# Sanity check: exclude the local client from RCLIENTS
local rclients=$(echo " $RCLIENTS " | sed -re "s/\s+$HOSTNAME\s+/ /g")
# Sanity check: exclude the dup entries
rclients=$(for i in $rclients; do echo $i; done | sort -u)
local clients="$SINGLECLIENT $HOSTNAME $rclients"
# Sanity check: exclude the dup entries from CLIENTS
# for those configs which has SINGLCLIENT set to local client
clients=$(for i in $clients; do echo $i; done | sort -u)
CLIENTS=`comma_list $clients`
local -a remoteclients=($rclients)
for ((i=0; $i<${#remoteclients[@]}; i++)); do
varname=CLIENT$((i + 2))
eval $varname=${remoteclients[i]}
done
CLIENTCOUNT=$((${#remoteclients[@]} + 1))
}
is_patchless ()
{
lctl get_param version | grep -q patchless
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment