diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-23 20:00:05 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-23 20:00:05 -0600 |
commit | 276034fc24ab7d00ec40564a7c3cad88bd7f60db (patch) | |
tree | fbde0c6e9fb5057ce5d9e6f06faf84fff0fdd893 | |
parent | 3bf70316529a50f2da1419c5b2504d9f7d089540 (diff) | |
download | puppet-276034fc24ab7d00ec40564a7c3cad88bd7f60db.tar.gz puppet-276034fc24ab7d00ec40564a7c3cad88bd7f60db.tar.xz puppet-276034fc24ab7d00ec40564a7c3cad88bd7f60db.zip |
Adding patch 20070927042000-6856b-38a0c82fd0a0d950937e7fe5a38b9901743402b3.patch from womble -- Recycle the connection more aggressively, to stop problems with clients that are newly requesting certificates
-rw-r--r-- | lib/puppet/network/client.rb | 6 | ||||
-rw-r--r-- | lib/puppet/network/xmlrpc/client.rb | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb index 7950abe3f..fa48ebfb5 100644 --- a/lib/puppet/network/client.rb +++ b/lib/puppet/network/client.rb @@ -85,9 +85,7 @@ class Puppet::Network::Client @driver = self.class.xmlrpc_client.new(args) - if self.read_cert - @driver.cert_setup(self) - end + self.read_cert # We have to start the HTTP connection manually before we start # sending it requests or keep-alive won't work. @@ -120,7 +118,7 @@ class Puppet::Network::Client # Make sure we set the driver up when we read the cert in. def read_cert if super - @driver.cert_setup(self) if @driver.respond_to?(:cert_setup) + @driver.recycle_connection(self) if @driver.respond_to?(:recycle_connection) return true else return false diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb index e2417120b..83d4cf203 100644 --- a/lib/puppet/network/xmlrpc/client.rb +++ b/lib/puppet/network/xmlrpc/client.rb @@ -61,7 +61,7 @@ module Puppet::Network raise error rescue Errno::EPIPE Puppet.warning "Other end went away; restarting connection and retrying" - self.recycle_connection + self.recycle_connection(@cert_client) retry rescue => detail Puppet.err "Could not call %s.%s: %s" % @@ -157,12 +157,12 @@ module Puppet::Network end end - def recycle_connection + def recycle_connection(client) conn_key = "%s:%s" % [@host, @port] @@http_cache.delete(conn_key) initialize_connection - cert_setup(@cert_client) + cert_setup(client) end def start |