summaryrefslogtreecommitdiffstats
path: root/lib/puppet/configurer
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-13 21:36:39 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-14 22:42:51 +1100
commit610c838146c03921455a15a7a93148748ff909a6 (patch)
tree9e3623153f7f5957e3506247427d681776d5184e /lib/puppet/configurer
parenta2eca6c8a1c69244426b077c5775a1cdbdae2d57 (diff)
downloadpuppet-610c838146c03921455a15a7a93148748ff909a6.tar.gz
puppet-610c838146c03921455a15a7a93148748ff909a6.tar.xz
puppet-610c838146c03921455a15a7a93148748ff909a6.zip
Fixing #1527 - Failing Facter does not hurt Puppet
At this point, the server's behaviour is a bit undefined if it tries to compile the catalog with no facts locally. The next commits will fix that. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/configurer')
-rw-r--r--lib/puppet/configurer/fact_handler.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/configurer/fact_handler.rb b/lib/puppet/configurer/fact_handler.rb
index d0e890f62..8a6de5e9f 100644
--- a/lib/puppet/configurer/fact_handler.rb
+++ b/lib/puppet/configurer/fact_handler.rb
@@ -18,7 +18,12 @@ module Puppet::Configurer::FactHandler
# 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.
- Puppet::Node::Facts.find(Puppet[:certname])
+ begin
+ Puppet::Node::Facts.find(Puppet[:certname])
+ rescue => detail
+ puts detail.backtrace if Puppet[:trace]
+ Puppet.err("Could not retrieve local facts: %s" % detail)
+ end
end
# Retrieve facts from the central server.