diff --git a/CHANGELOG.md b/CHANGELOG.md index 38da595a7..3512f3b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.7.3 (unreleased) + - Retry all SSH on Net::SSH::Disconnect in case SSH is just restarting. [GH-313] - Add NFS shared folder support for Arch linux. [GH-346] - Fix issue with unknown terminal type output for sudo commands. - Forwarded port protocol can now be set as UDP. [GH-311] diff --git a/lib/vagrant/ssh/session.rb b/lib/vagrant/ssh/session.rb index d9e997b00..a82bc658b 100644 --- a/lib/vagrant/ssh/session.rb +++ b/lib/vagrant/ssh/session.rb @@ -61,7 +61,7 @@ module Vagrant # the actual `exec!` implementation, except that this # implementation also reports `:exit_status` to the block if given. def exec!(command, options=nil, &block) - retryable(:tries => 5, :on => IOError, :sleep => 0.5) do + retryable(:tries => 5, :on => [IOError, Net::SSH::Disconnect], :sleep => 1.0) do metach = session.open_channel do |channel| channel.exec(command) do |ch, success| raise "could not execute command: #{command.inspect}" unless success