From 91555d0a869c5e2c357b75b640129664c8ed0b04 Mon Sep 17 00:00:00 2001 From: Henry Hsu Date: Tue, 15 Apr 2014 11:32:05 -0700 Subject: [PATCH] Fixes not enough time for docker restart before continuing on to next provisioning step --- .../docker/cap/debian/docker_configure_auto_start.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/provisioners/docker/cap/debian/docker_configure_auto_start.rb b/plugins/provisioners/docker/cap/debian/docker_configure_auto_start.rb index 8a04e6cc5..4f6634170 100644 --- a/plugins/provisioners/docker/cap/debian/docker_configure_auto_start.rb +++ b/plugins/provisioners/docker/cap/debian/docker_configure_auto_start.rb @@ -9,6 +9,10 @@ module VagrantPlugins comm.sudo("echo 'DOCKER_OPTS=\"-r=true ${DOCKER_OPTS}\"' >> /etc/default/docker") comm.sudo("stop docker") comm.sudo("start docker") + [0, 1, 2, 4].each do |delay| + sleep delay + break if comm.test('test -f /var/run/docker.pid') + end end end end