Ticket #1176: puppet-fix-1176.patch

File puppet-fix-1176.patch, 1.6 KB (added by arogge, 2 years ago)

Change fixed timeout of 120 seconds to Puppet[:configtimeout]

  • lib/puppet/network/http_pool.rb

    Change fixed timeout of 120 seconds to Puppet[:configtimeout] so
    configtimeout works if you set it to a value > 120
    
    Fixes #1176
    
    Signed-off-by: Andreas Rogge <a.rogge@solvention.de>
    ---
     lib/puppet/network/http_pool.rb     |    5 +++--
     lib/puppet/network/xmlrpc/client.rb |    2 +-
     2 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/lib/puppet/network/http_pool.rb b/lib/puppet/network/http_pool.rb
    index 9d37f2e..03c526b 100644
    a b  
    8888        class << http; attr_accessor :ca_file; end 
    8989 
    9090        http.use_ssl = true 
    91         http.read_timeout = 120 
    92         http.open_timeout = 120 
     91       # Use configured timeout (#1176) 
     92        http.read_timeout = Puppet[:configtimeout] 
     93        http.open_timeout = Puppet[:configtimeout] 
    9394        # JJM Configurable fix for #896. 
    9495        if Puppet[:http_enable_post_connection_check] 
    9596            http.enable_post_connection_check = true 
  • lib/puppet/network/xmlrpc/client.rb

    diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/cli
    ent.rb
    index f6a5e8d..2a255f6 100644
    a b  
    118118                nil, # user 
    119119                nil, # password 
    120120                true, # use_ssl 
    121                 120 # a two minute timeout, instead of 30 seconds 
     121                Puppet[:configtimeout] # use configured timeout (#1176) 
    122122            ) 
    123123            @http = Puppet::Network::HttpPool.http_instance(@host, @port) 
    124124        end