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
max_failed_percentage exit 0 #4407
Comments
Hi Nandor, In the above you have set max_failure_percentage to 50% and you have had one failure. So yes, it's doing the right thing in going on -- but I can see what you mean about having a nice way to make sure this failure shows up in Jenkins. Perhaps we should set a global flag and if we would have returned 0 and that flag is set, we can return a new exit code that we have previously unused (like, I believe, 4) and print a message at the bottom. This is a very good idea, so I'm tagging this as a priority feature request. |
Hey Michael, thanks for the quick response! |
Ordinarily speaking we should return non-zero if there are any failures, so this seems more like max_fail just eating the error code. But yes, agree that there should be a code here. |
Reclassifying this as a bug report so we can investigate and close this out. |
@dominis I did find a bug in how the failed percentage was calcuated when serial is set, which is now fixed by 5b3b9ba http://docs.ansible.com/playbooks_delegation.html#maximum-failure-percentage Max fail percentage was only intended to abort the play if the threshold was reached, but has never been a way to alter the final exit code and override detected host failure/unreachable. We are going to keep that behavior as is, because a change could be very confusing for users who rely on the exit code 0 to mean a perfect execution. |
max_failed_percentage always sends a non zero exit status even if the percentage is not exceed.
I don't think this should be the same as this:
ansible version:
The text was updated successfully, but these errors were encountered: