providers/docker: retry container ssh command [GH-3763]

This commit is contained in:
Mitchell Hashimoto 2014-05-17 13:14:07 -07:00
parent 9c7fb05d5f
commit efd67e6c9d
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,8 @@ BUG FIXES:
crash. [GH-3827]
- providers/docker: Never do graceful shutdown, always use
`docker stop`. [GH-3798]
- providers/docker: Better error messaging when SSH is not ready
direct to container. [GH-3763]
- provisioners/puppet: Fix setting facter vars with Windows
guests. [GH-3776]
- guests/darwin: Respect mount options for NFS. [GH-3791]

View File

@ -25,7 +25,9 @@ module VagrantPlugins
return false if !@host_vm.communicate.ready?
# We're ready if we can establish an SSH connection to the container
@host_vm.communicate.test("#{container_ssh_command} exit")
command = container_ssh_command
return false if !command
@host_vm.communicate.test("#{command} exit")
end
def download(from, to)
@ -131,6 +133,7 @@ module VagrantPlugins
def container_ssh_command
# Get the container's SSH info
info = @machine.ssh_info
return nil if !info
info[:port] ||= 22
# Make sure our private keys are synced over to the host VM