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.
This commit is contained in:
Yu-Ju Hong 2016-02-16 15:10:15 -08:00
parent 5516b8684f
commit b92e2903fa
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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