From b92e2903fad0a74ca931c5f942535d10286fd1be Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Tue, 16 Feb 2016 15:10:15 -0800 Subject: [PATCH] Switched to using `docker version` as health check `docker ps` can sometimes take a long time to finish, and restarting docker in this case doesn't help. --- cluster/gce/trusty/configure.sh | 2 +- cluster/saltbase/salt/supervisor/docker-checker.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/gce/trusty/configure.sh b/cluster/gce/trusty/configure.sh index 7d59e864aae..2c95929e0b2 100644 --- a/cluster/gce/trusty/configure.sh +++ b/cluster/gce/trusty/configure.sh @@ -261,7 +261,7 @@ health_monitoring() { # We simply kill the process when there is a failure. Another upstart job will automatically # restart the process. while [ 1 ]; do - if ! timeout 20 docker ps > /dev/null; then + if ! timeout 10 docker version > /dev/null; then echo "Docker daemon failed!" pkill docker fi diff --git a/cluster/saltbase/salt/supervisor/docker-checker.sh b/cluster/saltbase/salt/supervisor/docker-checker.sh index 22195033a17..05492e75589 100755 --- a/cluster/saltbase/salt/supervisor/docker-checker.sh +++ b/cluster/saltbase/salt/supervisor/docker-checker.sh @@ -25,7 +25,7 @@ echo "waiting a minute for startup" sleep 60 while true; do - if ! sudo timeout 20 docker ps > /dev/null; then + if ! sudo timeout 10 docker version > /dev/null; then echo "Docker failed!" exit 2 fi