Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase docker-healthcheck respose timeout #5644

Merged
merged 1 commit into from
Nov 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# This script is intended to be run periodically, to check the health
# of docker. If it detects a failure, it will restart docker using systemctl.

if timeout 10 docker ps > /dev/null; then
if timeout 60 docker ps > /dev/null; then
echo "docker healthy"
exit 0
fi
Expand All @@ -26,20 +26,26 @@ echo "docker failed"
echo "Giving docker 30 seconds grace before restarting"
sleep 30

if timeout 10 docker ps > /dev/null; then
if timeout 60 docker ps > /dev/null; then
echo "docker recovered"
exit 0
fi

echo "docker still down; triggering docker restart"
systemctl restart docker
echo "docker still unresposive; triggering docker restart"
systemctl stop docker

echo "Waiting 60 seconds to give docker time to start"
echo "wait all tcp sockets to close"
tatobi marked this conversation as resolved.
Show resolved Hide resolved
sleep `cat /proc/sys/net/ipv4/tcp_fin_timeout`

sleep 10
systemctl start docker

echo "Waiting 120 seconds to give docker time to start"
tatobi marked this conversation as resolved.
Show resolved Hide resolved
sleep 60

if timeout 10 docker ps > /dev/null; then
if timeout 60 docker ps > /dev/null; then
echo "docker recovered"
exit 0
fi

echo "docker still failing"
echo "docker still failing"