Skip to content

Commit c1c4594

Browse files
Merge pull request #51 from chickenkiller/fix/install-deps-loop
Fix dpkg lock file conflicts during runner install
2 parents bbcacae + da7872c commit c1c4594

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cloudconfig/templates.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,16 @@ if [ ! -d "$RUN_HOME" ];then
9696
downloadAndExtractRunner
9797
sendStatus "installing dependencies"
9898
cd "$RUN_HOME"
99-
sudo ./bin/installdependencies.sh || fail "failed to install dependencies"
99+
attempt=1
100+
while true; do
101+
sudo ./bin/installdependencies.sh && break
102+
if [ $attempt -gt 5 ];then
103+
fail "failed to install dependencies after $attempt attempts"
104+
fi
105+
sendStatus "failed to install dependencies (attempt $attempt): (retrying in 15 seconds)"
106+
attempt=$((attempt+1))
107+
sleep 15
108+
done
100109
else
101110
sendStatus "using cached runner found in $RUN_HOME"
102111
cd "$RUN_HOME"

0 commit comments

Comments
 (0)