summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-03-18 16:04:42 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-03-18 16:05:05 -0700
commitdf20513122354deccd4ee4477a15cb70c5d605c6 (patch)
tree5361514219087e35095bf2c91a7f2fbc5f984894 /lib
parent17f673dd6fee08309970f8ff721855cf1644b45f (diff)
downloadpuppet-df20513122354deccd4ee4477a15cb70c5d605c6.tar.gz
puppet-df20513122354deccd4ee4477a15cb70c5d605c6.tar.xz
puppet-df20513122354deccd4ee4477a15cb70c5d605c6.zip
(#6658) Propagate ENC connection errors to the agent
When the master failed to run the External Node Classifier script it would log an error on the master, but the agent didn't get back the full error or the stack trace for it's logs. By raising when there's an ENC script problem on the master, this causes the error messages to propagate to the agent. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/indirector/exec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/puppet/indirector/exec.rb b/lib/puppet/indirector/exec.rb
index fa789442b..4683eda0f 100644
--- a/lib/puppet/indirector/exec.rb
+++ b/lib/puppet/indirector/exec.rb
@@ -35,8 +35,7 @@ class Puppet::Indirector::Exec < Puppet::Indirector::Terminus
begin
output = execute(external_command)
rescue Puppet::ExecutionFailure => detail
- Puppet.err "Failed to find #{name} via exec: #{detail}"
- return nil
+ raise Puppet::Error, "Failed to find #{name} via exec: #{detail}"
end
if output =~ /\A\s*\Z/ # all whitespace