Merge remote-tracking branch 'ody/debian/master/honor_config_setting'

This commit is contained in:
Mitchell Hashimoto 2011-11-24 21:49:30 -07:00
commit f6055f8711
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ module Vagrant
exceptions = [Errno::ECONNREFUSED, Net::SSH::Disconnect]
# Connect to SSH and gather the session
session = retryable(:tries => 5, :on => exceptions) do
session = retryable(:tries => env.config.ssh.max_tries, :on => exceptions) do
connection = Net::SSH.start(env.config.ssh.host,
env.config.ssh.username,
opts.merge( :keys => [env.config.ssh.private_key_path],

View File

@ -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!(commands, options=nil, &block)
retryable(:tries => 5, :on => [IOError, Net::SSH::Disconnect], :sleep => 1.0) do
retryable(:tries => env.config.ssh.max_tries, :on => [IOError, Net::SSH::Disconnect], :sleep => 1.0) do
metach = session.open_channel do |ch|
ch.exec("#{env.config.ssh.shell} -l") do |ch2, success|
# Set the terminal