Issue #19033 has been updated by Jeff McCune. Status changed from Needs Decision to Needs More Information
---------------------------------------- Bug #19033: Exit status is 0, even in the presence of errors, without --detailed-exitcodes https://projects.puppetlabs.com/issues/19033#change-82603 Author: Michael Armida Status: Needs More Information Priority: Normal Assignee: Category: error reporting Target version: Affected Puppet version: 2.7.18 Keywords: Branch: When an error is encountered while running either `puppet apply` or `puppet agent`, the program exits with status 0. If `--detailed-exitcodes` is used with `puppet agent`, the status is nonzero as expected. I would expect that "non-detailed exit codes" would still include 1 for the case of a failure to apply the catalog. You can recreate this with the following manifest: <pre> exec { 'false': command => '/bin/false', } </pre> Example run: <pre> marmida@monolith:~$ puppet apply fail_manifest.py warning: Could not retrieve fact fqdn err: /Stage[main]//Exec[false]/returns: change from notrun to 0 failed: /bin/false returned 1 instead of one of [0] at /home/marmida/fail_manifest.py:3 notice: Finished catalog run in 0.14 seconds marmida@monolith:~$ echo $? 0 marmida@monolith:~$ puppet apply fail_manifest.py --detailed-exitcodes warning: Could not retrieve fact fqdn err: /Stage[main]//Exec[false]/returns: change from notrun to 0 failed: /bin/false returned 1 instead of one of [0] at /home/marmida/fail_manifest.py:3 notice: Finished catalog run in 0.13 seconds marmida@monolith:~$ echo $? 4 </pre> The same problems occur in `puppet agent`. I couldn't find another issue specific to the exit status, but I did notice it mentioned once here: http://projects.puppetlabs.com/issues/14458#note-6 -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
