From 5c941bca8f080c20e8fea32ebb3b781caa024ebc Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Thu, 9 Aug 2018 15:19:08 +0200 Subject: lava-slave: increase connect to master timeout When trying to detect if master is up, we have set a timeout of 60s. This is good for most of the time, but when the master is restoring a database, 60s is not enougth. This patch increase timeout to 300s. --- lava-slave/scripts/setup.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lava-slave/scripts') diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh index e7992c0..e688c9e 100755 --- a/lava-slave/scripts/setup.sh +++ b/lava-slave/scripts/setup.sh @@ -15,17 +15,18 @@ cd /root/lavacli LAVACLIOPTS="--uri $LAVA_MASTER_URI" # do a sort of ping for letting master to be up -TIMEOUT=30 +TIMEOUT=300 while [ $TIMEOUT -ge 1 ]; do + STEP=2 lavacli $LAVACLIOPTS device-types list 2>/dev/null >/dev/null if [ $? -eq 0 ];then TIMEOUT=0 else echo "Wait for master...." - sleep 2 + sleep $STEP fi - TIMEOUT=$(($TIMEOUT-1)) + TIMEOUT=$(($TIMEOUT-$STEP)) done # This directory is used for storing device-types already added -- cgit 1.2.3-korg