You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My usecases: I'd like to test execute state.highstate test=True as part of my continuous integration to see everything is applicable and syntax is correct. I'd like to know if exit code can be used to check this (or if I need to parse output).
Since I use Jenkins for CI I need an option for salt to return a nonzero return code if any minion in any state run returns a "False" so that my salt job as a whole can be marked "Failed" and I don't have to read all of the job output to determine if there's a problem with a build/deploy.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
What would be the best way to implement this? I guess going through each module and implement them one by one? Is there some sort of list of modules with missing retcodes?
In reply to @obitech and in general...
Let's avoid "ALL or NOTHING" approach and,
instead, get this minimum done with ALL the rest is in FUTURE follow-ups.
It should conform to minimal common standard for exit codes used by most CLI commands:
== 0: success
!= 0: failure
That is it - task can be closed then.
FUTURE
If module doesn't follow convention above, it's a separate bug against that module.
Initially, logs or sources will describe why it failed - no immediate documentation required.
Eventually, all cases will be classified as failure OR success considering common use case (by majority). All border-line cases required by minority should simply be enforce-able with --failure-on-[this], or --failure-on-[that], or --success-on-[something else] as exception to common rule.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Activity
basepi commentedon Jul 14, 2014
Thanks, it would be really good to get these documented.
JensRantil commentedon Jul 15, 2014
My usecases: I'd like to test execute
state.highstate test=Trueas part of my continuous integration to see everything is applicable and syntax is correct. I'd like to know if exit code can be used to check this (or if I need to parse output).perdurabo93 commentedon Jul 16, 2014
Since I use Jenkins for CI I need an option for salt to return a nonzero return code if any minion in any state run returns a "False" so that my salt job as a whole can be marked "Failed" and I don't have to read all of the job output to determine if there's a problem with a build/deploy.
JensRantil commentedon Oct 3, 2014
Not sure exit codes are set correct in
2014.1.10. I could not trigger anything else than exit code0forstate.highstateexecution.basepi commentedon Oct 6, 2014
Pretty sure all the exit code changes are in 2014.7.0.
uvsmtid commentedon Jul 5, 2015
Related #18510.
stale commentedon Nov 26, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
stale commentedon Nov 27, 2017
Thank you for updating this issue. It is no longer marked as stale.
JensRantil commentedon Nov 27, 2017
Still relevant.
abh23 commentedon Apr 3, 2018
Is the documentation available yet?
I want to see retcodes that are available for modules like pkg.install, etc.
obitech commentedon May 7, 2018
What would be the best way to implement this? I guess going through each module and implement them one by one? Is there some sort of list of modules with missing retcodes?
uvsmtid commentedon May 7, 2018
In reply to @obitech and in general...
Let's avoid "ALL or NOTHING" approach and,
instead, get this minimum done with ALL the rest is in FUTURE follow-ups.
It should conform to minimal common standard for exit codes used by most CLI commands:
== 0: success!= 0: failureThat is it - task can be closed then.
FUTURE
--failure-on-[this], or--failure-on-[that], or--success-on-[something else]as exception to common rule.stale commentedon Aug 20, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.