From f652cbfd532042620565c6464c2a9cef947f3b0d Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Tue, 14 May 2019 01:04:18 +0530 Subject: Revert default session timeout value Signed-off-by: Vivek Singh --- lib/chef/knife/bootstrap.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 3f8f3642b5..0ba0e72f66 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -69,8 +69,7 @@ class Chef option :session_timeout, long: "--session-timeout SECONDS", description: "The number of seconds to wait for each connection operation to be acknowledged while running bootstrap.", - proc: Proc.new { |protocol| Chef::Config[:knife][:session_timeout] = protocol }, - default: 60 + proc: Proc.new { |protocol| Chef::Config[:knife][:session_timeout] = protocol } # WinRM Authentication option :winrm_ssl_peer_fingerprint, @@ -839,7 +838,7 @@ class Chef return opts if connection_protocol == "winrm" opts[:non_interactive] = true # Prevent password prompts from underlying net/ssh opts[:forward_agent] = (config_value(:ssh_forward_agent) === true) - opts[:connection_timeout] = config_value(:session_timeout).to_i + opts[:connection_timeout] = config_value(:session_timeout)&.to_i || 60 opts end @@ -938,7 +937,7 @@ class Chef opts[:ca_trust_file] = config_value(:ca_trust_file) end - opts[:operation_timeout] = config_value(:session_timeout).to_i + opts[:operation_timeout] = config_value(:session_timeout)&.to_i || 60 opts end -- cgit v1.2.1