[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08
James Turnbull
james at lovedthanlost.net
Fri Jan 15 09:07:09 UTC 2010
The following commit has been merged in the upstream branch:
commit adc0a4ed939a717e8735485d493bde28ceab5ac0
Author: Markus Roberts <Markus at reality.com>
Date: Mon Oct 19 21:51:32 2009 -0700
Fix for #2661 and related issues
If setup code for a process depends on network connectivity
it needs to be protected with a rescue clause as much as the
main body of the process.
Further, Timeout exceptions aren't under StandardError and thus
aren't caught by an un-typed rescue clause. This doesn't matter
if we've morphed the exception, but will cause the program to
fail if we haven't.
There are many places where these concerns _might_ cause a problem
but in most cases they never will in practice; this patch addresses
the five cases where I have been able to confirm that it actually
can cause the client daemon to exit and two more where I suspect
(but can not prove) that it could.
This is an extension of the prior patch to cover additional cases
found by automated testing (repeated catalog runs with a 1% chance
of timeout forced on all timeout-bound operations, ~5000 runs).
The new cases recurred multiple times (>100 each) and in a final pass
with these corrected (~2500 runs) no additional cases were found.
diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb
index a188df3..7896605 100644
--- a/lib/puppet/agent.rb
+++ b/lib/puppet/agent.rb
@@ -51,7 +51,7 @@ class Puppet::Agent
with_client do |client|
begin
sync.synchronize { lock { client.run(*args) } }
- rescue => detail
+ rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not run %s: %s" % [client_class, detail]
end
@@ -122,7 +122,7 @@ class Puppet::Agent
def with_client
begin
@client = client_class.new
- rescue => detail
+ rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not create instance of %s: %s" % [client_class, detail]
return
diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb
index 12726e7..3e72fa5 100644
--- a/lib/puppet/configurer.rb
+++ b/lib/puppet/configurer.rb
@@ -93,7 +93,7 @@ class Puppet::Configurer
duration = thinmark do
result = catalog_class.find(name, fact_options.merge(:ignore_cache => true))
end
- rescue => detail
+ rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not retrieve catalog from remote server: %s" % detail
end
diff --git a/lib/puppet/configurer/fact_handler.rb b/lib/puppet/configurer/fact_handler.rb
index 8e0fef7..cbb6276 100644
--- a/lib/puppet/configurer/fact_handler.rb
+++ b/lib/puppet/configurer/fact_handler.rb
@@ -11,14 +11,13 @@ module Puppet::Configurer::FactHandler
end
def find_facts
- reload_facter()
-
# This works because puppetd configures Facts to use 'facter' for
# finding facts and the 'rest' terminus for caching them. Thus, we'll
# compile them and then "cache" them on the server.
begin
+ reload_facter()
Puppet::Node::Facts.find(Puppet[:certname])
- rescue => detail
+ rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
raise Puppet::Error, "Could not retrieve local facts: %s" % detail
end
diff --git a/lib/puppet/indirector/ldap.rb b/lib/puppet/indirector/ldap.rb
index 51bab0e..744a839 100644
--- a/lib/puppet/indirector/ldap.rb
+++ b/lib/puppet/indirector/ldap.rb
@@ -1,4 +1,4 @@
-require 'puppet/indirector/terminus'
+requir 'puppet/indirector/terminus'
require 'puppet/util/ldap/connection'
class Puppet::Indirector::Ldap < Puppet::Indirector::Terminus
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list