From 8a05bb5f5b1bbfcd5681dbf23282a9ba32e0eb0f Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 20 Sep 2015 15:04:56 +0200 Subject: reproducible: on remote host problems: sleep longer if the 2nd host is down, in general sleep shorter though, as retrying is rather cheap --- bin/reproducible_build.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index ce5cc8a3..5fcda1a6 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -572,9 +572,10 @@ remote_build() { RESULT=$? # abort job if host is down if [ $RESULT -ne 0 ] ; then - echo "$(date -u) - $NODE seems to be down, sleeping 23min before aborting this job." + SLEEPTIME=$(echo "$BUILDNR*$BUILDNR*5"|bc) + echo "$(date -u) - $NODE seems to be down, sleeping ${SLEEPTIME}min before aborting this job." unregister_build - sleep 23m + sleep ${SLEEPTIME}m exec /srv/jenkins/bin/abort.sh fi ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR} @@ -588,8 +589,8 @@ remote_build() { rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/ RESULT=$? if [ $RESULT -ne 0 ] ; then - echo "$(date -u ) - rsync from $NODE failed, sleeping 5m before re-trying..." | tee -a ${RBUILDLOG} - sleep 5m + echo "$(date -u ) - rsync from $NODE failed, sleeping 2m before re-trying..." | tee -a ${RBUILDLOG} + sleep 2m rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/ RESULT=$? if [ $RESULT -ne 0 ] ; then -- cgit v1.2.3-70-g09d2