communicators/ssh: properly allow errors through while waiting
This commit is contained in:
parent
ed5e544e63
commit
2fe2fe79ed
|
@ -53,6 +53,7 @@ module VagrantPlugins
|
||||||
@machine.ui.detail("SSH auth method: #{ssh_auth_type}")
|
@machine.ui.detail("SSH auth method: #{ssh_auth_type}")
|
||||||
|
|
||||||
while true
|
while true
|
||||||
|
message = nil
|
||||||
begin
|
begin
|
||||||
begin
|
begin
|
||||||
connect(retries: 1)
|
connect(retries: 1)
|
||||||
|
@ -75,9 +76,13 @@ module VagrantPlugins
|
||||||
message = "Host appears down."
|
message = "Host appears down."
|
||||||
rescue Errno::EHOSTUNREACH
|
rescue Errno::EHOSTUNREACH
|
||||||
message = "Host unreachable."
|
message = "Host unreachable."
|
||||||
|
rescue Vagrant::Errors::VagrantError => e
|
||||||
|
# Ignore it, SSH is not ready, some other error.
|
||||||
end
|
end
|
||||||
|
|
||||||
@machine.ui.detail("Error: #{message} Retrying...")
|
if message
|
||||||
|
@machine.ui.detail("Error: #{message} Retrying...")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue Timeout::Error
|
rescue Timeout::Error
|
||||||
|
|
Loading…
Reference in New Issue