Commit 156d3011 authored by Yu-Ju Hong's avatar Yu-Ju Hong

Change docker health checker to using `docker ps`

`docker ps` is a more reliable health check than docker version from past experiences.
parent 26b6b18f
...@@ -258,7 +258,7 @@ script ...@@ -258,7 +258,7 @@ script
# We simply kill the process when there is a failure. Another upstart job will automatically # We simply kill the process when there is a failure. Another upstart job will automatically
# restart the process. # restart the process.
while [ 1 ]; do while [ 1 ]; do
if ! timeout 10 docker version > /dev/null; then if ! timeout 20 docker ps > /dev/null; then
echo "Docker daemon failed!" echo "Docker daemon failed!"
pkill docker pkill docker
fi fi
......
...@@ -25,7 +25,7 @@ echo "waiting a minute for startup" ...@@ -25,7 +25,7 @@ echo "waiting a minute for startup"
sleep 60 sleep 60
while true; do while true; do
if ! sudo timeout 10 docker version > /dev/null; then if ! sudo timeout 20 docker ps > /dev/null; then
echo "Docker failed!" echo "Docker failed!"
exit 2 exit 2
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment