Skip to content

Document exit codes #14155

Closed
Closed

Description

@JensRantil

#11337 only partially fixed #7013. It did not document the actual exit codes.

Proposal: That at least the man page documents exit codes. Using exit codes is highly useful when for example automating deployment using Salt.

Activity

  1. basepi commented on Jul 14, 2014

    @basepi
    Contributor

    Thanks, it would be really good to get these documented.

  2. added this to the Approved milestone on Jul 14, 2014
  3. JensRantil commented on Jul 15, 2014

    @JensRantil
    ContributorAuthor

    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).

  4. perdurabo93 commented on Jul 16, 2014

    @perdurabo93
    Contributor

    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.

  5. JensRantil commented on Oct 3, 2014

    @JensRantil
    ContributorAuthor

    Not sure exit codes are set correct in 2014.1.10. I could not trigger anything else than exit code 0 for state.highstate execution.

  6. basepi commented on Oct 6, 2014

    @basepi
    Contributor

    Pretty sure all the exit code changes are in 2014.7.0.

  7. uvsmtid commented on Jul 5, 2015

    @uvsmtid
    Contributor

    Related #18510.

  8. stale commented on Nov 26, 2017

    @stale

    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.

  9. stale commented on Nov 27, 2017

    @stale

    Thank you for updating this issue. It is no longer marked as stale.

  10. JensRantil commented on Nov 27, 2017

    @JensRantil
    ContributorAuthor

    Still relevant.

  11. abh23 commented on Apr 3, 2018

    @abh23

    Is the documentation available yet?
    I want to see retcodes that are available for modules like pkg.install, etc.

  12. obitech commented on May 7, 2018

    @obitech

    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?

  13. uvsmtid commented on May 7, 2018

    @uvsmtid
    Contributor

    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.
  14. stale commented on Aug 20, 2019

    @stale

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationstale

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions