Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 35165, salt-run jobs.exit_success jid is broken #35331

Merged
merged 1 commit into from
Aug 10, 2016

Conversation

hu-dabao
Copy link
Contributor

@hu-dabao hu-dabao commented Aug 10, 2016

What does this PR do?

Fix #35165
For more details about the issue, please check the issue url.

A little bit more details about the fix:
It is calling list_job rather than lookup_jid because lookup_jid only returns successful 'Result' of returned minions whereas list_job returns more info which include failed minions as well.
From the load perspective, calling list_job is same as calling lookup_jid because lookup_jid just calls list_job and trim the 'Result'.

exit_success will return True for minions that have successful returns and False for those that don't have returns or defunct returns.

retcode is not able to be used in determining job success because all of the job management and execution codes do not have retcode as a field. Feel free to correct me if I am wrong

What issues does this PR fix or reference?

Previous Behavior

Check the issue for more details.
In short, salt-run jobs.exit_success jid is broken

New Behavior

salt-run jobs.exit_success jid
minion1:
    False
minion2:
    True

Tests written?

No

Please review Salt's Contributing Guide for best practices.

@cachedout cachedout merged commit 78dfd18 into saltstack:2016.3 Aug 10, 2016
@wwentland
Copy link
Contributor

Thank you!

@hu-dabao hu-dabao deleted the fix-35165 branch August 11, 2016 22:25
@evan-ty
Copy link

evan-ty commented Sep 5, 2016

Hey guys, thanks for looking into this. I was using this via the salt runner client api, and I noticed the behavior that it reports that the run was a success even though some states exited with a retcode of 1:

https://paste.debian.net/810250/

In this paste, there is the output and the code I used to get that output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants