devopsgroup-io / vagrant-digitalocean

:droplet: A Vagrant provider plugin that manages DigitalOcean droplets.
Mozilla Public License 2.0
1.71k stars 182 forks source link

reload doesn't retry ssh after the first ssh connection attempt times out #275

Closed gsauthof closed 5 years ago

gsauthof commented 6 years ago

Currently, a vagrant reload always fails with this scary message:

==> dropletname: Rebooting the droplet...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

Turning on debug output (--debug) one can see that vagrant immediately tries to ssh into the droplet (synced_folders: Invoking synced folder prepare for: rsync and then Attempting SSH connection...) after it has received the digitalocean API completion response ("status"=>"completed", "type"=>"reboot").

There doesn't seem to be any attempts at retrying to establish an ssh connection.

Right before the error message, the debug log contains:

DEBUG ssh: == Net-SSH connection debug-level log START ==
DEBUG ssh: D, [2018-02-04T21:23:24.995675 #25399] DEBUG -- 
net.ssh.transport.session[2ac0395acfc0]: establishing connection to XXX.XXX.XXX.XXX:22
DEBUG ssh: == Net-SSH connection debug-level log END ==
 INFO ssh: SSH not up: #<Vagrant::Errors::NetSSHException: An error occurred in the
    underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this
library are caused by ssh-agent issues. Try disabling your SSH
agent or removing some keys and try again.
If the problem persists, please report a bug to the net-ssh project.
Net::SSH::ConnectionTimeout>

Related issues:

I'm opening a new issue, because #219 is about a hard coded timeout not being enough - but AFAICS with the above there isn't any timeout logic at work, at all.

Used versions:

seth-reeser commented 5 years ago

Hello, are you still having this issue? Either way if you could please reply with a solution or any further findings to help move you along that would be great.