kill them all and use ssh's ConnectionAttempts option

... instead of implementing this in bash.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1669 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-09-20 17:19:49 +00:00
parent e4dcb0db81
commit ab7b2bb160

View File

@ -15,8 +15,8 @@ SCRIPTDIR=$(readlink -f $(dirname $0))
source $SCRIPTDIR/fail-env.sh
CMD="killall -q client.sh"
SSH='ssh -o BatchMode=yes -o ConnectTimeout=60'
CONNECTION_ATTEMPTS=2
SSH="ssh -o BatchMode=yes -o ConnectTimeout=60 -o ConnectionAttempts=$CONNECTION_ATTEMPTS"
for h in $FAIL_EXPERIMENT_HOSTS
do
@ -29,13 +29,5 @@ do
NCLIENTS=
fi
(
for i in $(seq $CONNECTION_ATTEMPTS)
do
$SSH $h "$CMD" && break
# failed? sleep 1-10s and retry.
sleep $(($RANDOM / (32768 / 10) + 1))
echo retrying $h ...
done
) &
$SSH $h "$CMD $NCLIENTS" &
done