lib/chef_metal/transport/ssh.rb in chef-metal-0.14.1 vs lib/chef_metal/transport/ssh.rb in chef-metal-0.14.2
- old
+ new
@@ -139,10 +139,10 @@
def available?
# If you can't pwd within 10 seconds, you can't pwd
execute('pwd', :timeout => 10)
true
- rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, Net::SSH::Disconnect
+ rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ENETUNREACH, Errno::EHOSTDOWN, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, Net::SSH::Disconnect
Chef::Log.debug("#{username}@#{host} unavailable: network connection failed or broke: #{$!.inspect}")
disconnect
false
rescue Net::SSH::AuthenticationFailed, Net::SSH::HostKeyMismatch
Chef::Log.debug("#{username}@#{host} unavailable: SSH authentication error: #{$!.inspect} ")