Skip to content

Commit

Permalink
revert the retry logic!
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale committed Aug 18, 2023
1 parent dddce75 commit 28549be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 90 deletions.
31 changes: 6 additions & 25 deletions src/docker-in-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,31 +423,12 @@ dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAU
INNEREOF
)"
retry_count=0
docker_ok="false"
until [ "${docker_ok}" = "true" ] || [ "${retry_count}" -eq "5" ];
do
# Start using sudo if not invoked as root
if [ "$(id -u)" -ne 0 ]; then
sudo /bin/sh -c "${dockerd_start}"
else
eval "${dockerd_start}"
fi
sleep 5s
set +e
docker info > /dev/null 2>&1 && docker_ok="true"
if [ "${docker_ok}" != "true" ]; then
echo "(*) Failed to start docker, retrying..."
retry_count=`expr $retry_count + 1`
fi
set -e
done
set +e
# Start using sudo if not invoked as root
if [ "$(id -u)" -ne 0 ]; then
sudo /bin/sh -c "${dockerd_start}"
else
eval "${dockerd_start}"
fi
# Execute whatever commands were passed in (if any). This allows us
# to set this script to ENTRYPOINT while still executing the default CMD.
Expand Down
32 changes: 0 additions & 32 deletions test/docker-in-docker/docker_retry.sh

This file was deleted.

6 changes: 0 additions & 6 deletions test/docker-in-docker/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,5 @@
}
},
"remoteUser": "node"
},
"docker_retry": {
"image": "ubuntu:focal",
"features": {
"docker-in-docker": {}
}
}
}
27 changes: 0 additions & 27 deletions test/docker-in-docker/test-scripts/docker-test-init.sh

This file was deleted.

0 comments on commit 28549be

Please sign in to comment.