Skip to content

Pass all data to batch.run() call when using --failhard - #33048

Merged
cachedout merged 1 commit into
saltstack:2015.8from
rallytime:fix-24996
May 5, 2016
Merged

cachedout merged 1 commit into
saltstack:2015.8from
rallytime:fix-24996

Conversation

@rallytime

Copy link
Copy Markdown
Contributor

What does this PR do?

Passes more data to batch.run when specifying --failhard. This allows salt.py to look for the function's retcode and stop the batch run when using --failhard.

What issues does this PR fix or reference?

Fixes #24996

Previous Behavior

Without this change, cmd_run worked as expected (because the retcode is passed automatically), but when using cmd.run, the failhard was honored and the batch run would continue instead of exiting:

root@rallytime:~# salt rallytime cmd.run 'foo' -b 1 --failhard

Executing run on ['rallytime']

rallytime:
    /bin/bash: foo: command not found
retcode:
    127

New Behavior

With this change, the retcode of the failed cmd.run command is recognized at the process exits:

root@rallytime:~# salt rallytime cmd.run 'foo' -b 1 --failhard

Executing run on ['rallytime']

ERROR: Minions returned with non-zero exit code

Tests written?

No

@cachedout
cachedout merged commit 54b783a into saltstack:2015.8 May 5, 2016
@rallytime
rallytime deleted the fix-24996 branch May 5, 2016 16:16
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.

2 participants