Commit b4ddf801 authored by David Johnson's avatar David Johnson

Change slave name expectation to comply with e649bd3a and 7d3d2500.

parent 442259d6
Pipeline #1913 passed with stage
in 2 seconds
......@@ -8,29 +8,27 @@ DIRNAME=`dirname $0`
#
# Get the IPs of all our nodes and build parallel ssh hostfiles.
#
i=0
slaves=""
touch all.hostfile
touch slaves.namefile
touch slaves.hostfile
master="$1"
echo "$master" > master.hostfile
echo "$master" > all.hostfile
echo "master" > master.namefile
shift
resourcemanager="$1"
echo "$resourcemanager" > resourcemanager.hostfile
echo "$resourcemanager" >> all.hostfile
echo "resourcemanager" > resourcemanager.namefile
shift
# Slaves start with i=1 (slave-1)
i=1
while [ $# -gt 0 ]; do
if [ $i -eq 0 ]; then
master="$1"
echo "$master" > master.hostfile
echo "$master" > all.hostfile
echo "master" > master.namefile
elif [ $i -eq 1 ]; then
resourcemanager="$1"
echo "$resourcemanager" > resourcemanager.hostfile
echo "$resourcemanager" >> all.hostfile
echo "resourcemanager" > resourcemanager.namefile
else
slavenum=`expr $i - 2`
slaves="$slaves $1"
echo "$1" >> all.hostfile
echo "$1" >> slaves.hostfile
echo "slave${slavenum}" >> slaves.namefile
fi
slaves="$slaves $1"
echo "$1" >> all.hostfile
echo "$1" >> slaves.hostfile
echo "slave-${i}" >> slaves.namefile
i=`expr $i + 1`
shift
done
......@@ -41,9 +39,9 @@ done
echo "$master master-link-1 master-0 master" > etc.hosts
echo "$resourcemanager resourcemanager-link-1 resourcemanager-0 resourcemanager" \
>> etc.hosts
i=0
i=1
for slave in $slaves ; do
echo "${slave} slave$i-link-1 slave$i-0 slave$i" >> etc.hosts
echo "${slave} slave-$i-link-1 slave-$i-0 slave-$i" >> etc.hosts
i=`expr $i + 1`
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment