Retry all SSH commands on Net::SSH::Disconnect
This commit is contained in:
parent
234c47a3a7
commit
6d669d70de
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue