Issue #10907 has been updated by Nigel Kersten.

But we don't log by default.

The following manifest on an agent run:
<pre>
exec { "test":
  command => "/bin/echo 'woot' && exit 1",
  logoutput => on_failure,
}
</pre>

First run has the logoutput line commented out, second doesn't.

<pre>
Dec  3 13:29:07 pe-centos5 puppet-agent[18289]: Applying configuration version 
'1322947745'
Dec  3 13:29:07 pe-centos5 puppet-agent[18289]: 
(/Stage[main]//Exec[test]/returns) change from notrun to 0 failed: /bin/echo 
'woot' && exit 1 returned 1 instead of one of [0] at 
/etc/puppetlabs/puppet/manifests/site.pp:13
...
Dec  3 13:29:33 pe-centos5 puppet-agent[18785]: Applying configuration version 
'1322947771'
Dec  3 13:29:34 pe-centos5 puppet-agent[18785]: 
(/Stage[main]//Exec[test]/returns) woot
Dec  3 13:29:34 pe-centos5 puppet-agent[18785]: 
(/Stage[main]//Exec[test]/returns) change from notrun to 0 failed: /bin/echo 
'woot' && exit 1 returned 1 instead of one of [0] at 
/etc/puppetlabs/puppet/manifests/site.pp:13
</pre>

It seems like we have a disconnect here... maybe it's just docs that need 
updating? 

Does that make your use case clearer Hunter?
----------------------------------------
Bug #10907: logoutput => on_failure should be default for Exec resource
https://projects.puppetlabs.com/issues/10907

Author: Hunter Haugen
Status: Needs Decision
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Whenever I use an exec resource, I always set `logoutput => on_failure`, since 
they shouldn't be failing by default. It's a rare case that I *don't* want 
helpful output on failures. `logoutput => on_failure` should be the default.

Pretty please?


-- 
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://projects.puppetlabs.com/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.

Reply via email to