Multi-command salt calls return highest exit #47544
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Running a multiple command salt call will currently make salt think that
all of the minions returned with a failed state regardless of the return
values of the modules actually run. Right now it just returns the value
of
retcode
in the return dictionary if the return value is adictionary.
This checks if the
retcode
value is a dictionary itself, and thenreturns the maximum return code that we recieved. This means that we
will continue to fail if the jobs did fail, but will return a zero if
all the jobs did so.
What issues does this PR fix or reference?
#18510
Previous Behavior
The salt summary would say that any multi-module salt call had failed, because it did not know how to parse returns with a dictionary
retcode
.New Behavior
Salt now handles dictionary
retcode
values by taking the highest return value from multi-module call and using that to determine if it failed.Tests written?
No
Commits signed with GPG?
Yes