Issue #2385 has been updated by Dan Bode.
sorry, formatting issues above
"indirector/exec.rb"
<pre>
39 begin
40 output = execute(external_command)
41 rescue Puppet::ExecutionFailure => detail
42 if $?.exitstatus == 1
# added the below line
43 Puppet.err "Could not retrieve external node information
for %s: %s" % [name, detail]
44 return nil
45 else
46 Puppet.err "Could not retrieve external node information
for %s: %s" % [name, detail]
47 end
48 return nil
49 end
</pre>
----------------------------------------
Bug #2385: external nodes supresses script output
http://projects.reductivelabs.com/issues/2385
Author: Dan Bode
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Complexity: Unknown
Affected version: 0.24.8
Keywords:
In at least debug mode, we should be able to see the output for external nodes
script if it fails with return code 1.
In most cases, the script can be tested from the command line, but this is not
always sufficient. I am currently running into some ruby loading issues where I
needed to see the output.
I read the code and it looks like a bug (but maybe there is something that I do
not understand.
I added line 43 to "indirector/exec.rb", but really it looks like this entire
conditional should be removed
Why is "1" being treated differently here? This is the most common return for
failure, which is when the output should be displayed.
39 begin
40 output = execute(external_command)
41 rescue Puppet::ExecutionFailure => detail
42 if $?.exitstatus == 1
########I added the line below to get output
43 Puppet.err "Could not retrieve external node information for
%s: %s" % [name, detail]
44 return nil
45 else
46 Puppet.err "Could not retrieve external node information
for %s: %s" % [name, detail]
47 end
48 return nil
49 end
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---