summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_worker.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-06-12 18:54:11 +0200
committerHolger Levsen <holger@layer-acht.org>2017-06-12 18:54:11 +0200
commit78f11f10a79e418964171a7041f7309b83352032 (patch)
tree40244f51c6054a19a2622bfb0c2ab21f68e74e3f /bin/reproducible_worker.sh
parentac8e4331c6ee2c539d4d147495fc0d77ef04037a (diff)
downloadjenkins.debian.net-78f11f10a79e418964171a7041f7309b83352032.tar.xz
reproducible Debian: retry once if systemctl times out
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_worker.sh')
-rwxr-xr-xbin/reproducible_worker.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/reproducible_worker.sh b/bin/reproducible_worker.sh
index f37ca689..c0a9d83e 100755
--- a/bin/reproducible_worker.sh
+++ b/bin/reproducible_worker.sh
@@ -32,8 +32,13 @@ while true ; do
SERVICE="reproducible_build@startup.service"
RUNNING=$(systemctl show $SERVICE|grep ^SubState|cut -d "=" -f2)
if [ "$RUNNING" != "running" ] ; then
- echo "$(date --utc) - '$SERVICE' not running, thus stopping this."
- break
+ # sometimes systemctl requests time out… handle that gracefully
+ sleep 23
+ RUNNING=$(systemctl show $SERVICE|grep ^SubState|cut -d "=" -f2)
+ if [ "$RUNNING" != "running" ] ; then
+ echo "$(date --utc) - '$SERVICE' not running, thus stopping this."
+ break
+ fi
fi
# sleep up to 2.3 seconds (additionally to the random sleep reproducible_build.sh does anyway)