communicators/ssh: rescue/show correct error messages
This commit is contained in:
parent
4c070a04d2
commit
67a0d3d5f1
|
@ -62,20 +62,22 @@ module VagrantPlugins
|
||||||
@logger.info("SSH not ready: #{e.inspect}")
|
@logger.info("SSH not ready: #{e.inspect}")
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
rescue Errno::ETIMEDOUT, Timeout::Error
|
rescue Vagrant::Errors::SSHConnectionTimeout
|
||||||
message = "Connection timout."
|
message = "Connection timout."
|
||||||
rescue Net::SSH::AuthenticationFailed
|
rescue Vagrant::Errors::SSHAuthenticationFailed
|
||||||
message = "Authentication failure."
|
message = "Authentication failure."
|
||||||
rescue Net::SSH::Disconnect
|
rescue Vagrant::Errors::SSHDisconnected
|
||||||
message = "Remote connection disconnect."
|
message = "Remote connection disconnect."
|
||||||
rescue Errno::ECONNREFUSED
|
rescue Vagrant::Errors::SSHConnectionRefused
|
||||||
message = "Connection refused."
|
message = "Connection refused."
|
||||||
rescue Errno::ECONNRESET
|
rescue Vagrant::Errors::SSHConnectionReset
|
||||||
message = "Connection reset."
|
message = "Connection reset."
|
||||||
rescue Errno::EHOSTDOWN
|
rescue Vagrant::Errors::SSHHostDown
|
||||||
message = "Host appears down."
|
message = "Host appears down."
|
||||||
rescue Errno::EHOSTUNREACH
|
rescue Vagrant::Errors::SSHNoRoute
|
||||||
message = "Host unreachable."
|
message = "Host unreachable."
|
||||||
|
rescue Vagrant::Errors::SSHKeyTypeNotSupported
|
||||||
|
raise
|
||||||
rescue Vagrant::Errors::VagrantError => e
|
rescue Vagrant::Errors::VagrantError => e
|
||||||
# Ignore it, SSH is not ready, some other error.
|
# Ignore it, SSH is not ready, some other error.
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue