Issue #22572 has been updated by Josh Cooper. Description updated
---------------------------------------- Bug #22572: Incorrect exit code from puppet apply without --detailed-exitcodes on Windows https://projects.puppetlabs.com/issues/22572#change-97548 * Author: Igor Berger * Status: Unreviewed * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: 3.2.4 * Keywords: windows * Branch: ---------------------------------------- puppet apply without --detailed-exitcodes returns 0 (success) even if underlying operation failed. Attached batch script tries to start a non-existing Windows service 3 ways and outputs this: ---- <pre> [SC] StartService: OpenService FAILED 1060: The specified service does not exist as an installed service. sc returned: 1060 Notice: Compiled catalog for my_node in environment production in 0.14 seconds Notice: /Stage[main]//Exec[not_there]/returns: [SC] StartService: OpenService FAILED 1060: Notice: /Stage[main]//Exec[not_there]/returns: Notice: /Stage[main]//Exec[not_there]/returns: The specified service does not exist as an installed service. Error: sc start AbsentService returned 36 instead of one of [0] Error: /Stage[main]//Exec[not_there]/returns: change from notrun to 0 failed: sc start AbsentService returned 36 instead of one of [0] Notice: Finished catalog run in 1.56 seconds puppet with --detailed-exitcodes returned: 4 Notice: Compiled catalog for my_node in environment production in 0.12 seconds Notice: /Stage[main]//Exec[not_there]/returns: [SC] StartService: OpenService FAILED 1060: Notice: /Stage[main]//Exec[not_there]/returns: Notice: /Stage[main]//Exec[not_there]/returns: The specified service does not exist as an installed service. Error: sc start AbsentService returned 36 instead of one of [0] Error: /Stage[main]//Exec[not_there]/returns: change from notrun to 0 failed: sc start AbsentService returned 36 instead of one of [0] Notice: Finished catalog run in 1.57 seconds puppet without --detailed-exitcodes returned: 0 </pre> ---- I expect the last attempt to return a non-0 (failure) exit code. -- 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. For more options, visit https://groups.google.com/groups/opt_out.
