From df20513122354deccd4ee4477a15cb70c5d605c6 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Fri, 18 Mar 2011 16:04:42 -0700 Subject: (#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 --- lib/puppet/indirector/exec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') 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 -- cgit