detailed exit codes

2,779 views
Skip to first unread message

Christopher Johnston

unread,
Jan 9, 2012, 5:47:44 PM1/9/12
to puppe...@googlegroups.com
Are these documented anywhere?  The man page does not list them all, but grokking the source I see the following.  I am looking to beef-up a puppet launching script we use so we can normalize some of the errors.

0 = no change
1 = failure (ssl related)?
2 = successful transaction
4 = failed transactions
6 = mix of failures and success

R.I.Pienaar

unread,
Jan 9, 2012, 5:52:34 PM1/9/12
to puppe...@googlegroups.com
puppet agent --help
.
.
detailed-exitcodes: Provide transaction information via exit codes. If
this is enabled, an exit code of '2' means there
were changes, and an exit code of '4' means that
there were failures during the transaction. This
option only makes sense in conjunction with
--onetime.

> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Developers" group.
> To post to this group, send email to puppe...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-dev+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>

--
R.I.Pienaar

Christopher Johnston

unread,
Jan 9, 2012, 6:53:52 PM1/9/12
to puppe...@googlegroups.com
Saw those, the source indicates 6 is if a run had some success and some fail( at least one of each).  

Nick Fagerlund

unread,
Jan 9, 2012, 8:09:23 PM1/9/12
to Puppet Developers
It's a bitmask; 4+2=6. We added that tidbit to the man page in version
2.7.3, but that fix doesn't show up in the 2.6 series. See
http://projects.puppetlabs.com/issues/8401

(A total failure of the run will still exit 1 when detailed-exitcodes
is turned on; the 2, 4, and 6 codes just replace the otherwise
uninformative 0 exit code..)
Reply all
Reply to author
Forward
0 new messages