Permalink
Browse files

Trap IOErrors as a normal condition.

Net::SSH will throw this if the connection is terminated by the remote host; in Veewee, this is used to chain together multiple postinstall scripts with reboots between them.
See this thread for more information: https://groups.google.com/d/topic/veewee/oacb_ko1pT0/discussion
  • Loading branch information...
1 parent 3163b68 commit 5a903c125397d943e9725b917dcc4dd508a2c1a9 Julian C. Dunn committed Jan 23, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/veewee/provider/core/helper/ssh.rb
@@ -47,6 +47,9 @@ def when_ssh_login_works(ip="127.0.0.1", options = { } , &block)
end
end
end
+ rescue IOError
+ ui.info "Received a disconnect; moving on"
+ sleep 5
rescue Timeout::Error
raise Veewee::Error, "Ssh timeout #{timeout} sec has been reached."
end

0 comments on commit 5a903c1

Please sign in to comment.