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

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

Merged
merged 1 commit into from
May 5, 2016

Conversation

rallytime
Copy link
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
gitebra pushed a commit to gitebra/salt that referenced this pull request May 10, 2016
* upstream/develop: (77 commits)
  Add list_values to reg module (saltstack#33120)
  Make sure new csf module docs are included in build (saltstack#33126)
  * Improve init script: specifically manage salt configurations rather than arbitrary salt processes (saltstack#32666)
  Join domain with new name (saltstack#32988)
  Fix functionality of unless in states.cmd, when unless condition given as a list (saltstack#33026)
  Fix override of ec2 volumetype (saltstack#33115)
  Pylint
  Take the develop version of glusterfs.py state
  Add a check that the cmdline of the found proc matches (saltstack#33101)
  Changed NAPALM output (saltstack#33095)
  Develop 2016 0509 0030 (saltstack#33111)
  Remove poorly written test (saltstack#33124)
  Add Support for CSF (saltstack#33117)
  Add PyYAML with CLoader (saltstack#33079)
  fix tests for file.blockplace to remove newline (saltstack#33082)
  Catch IOLoop RuntimeError on CLI exit (saltstack#33070)
  Disable pylint warning for unused imports
  Add fun_args to scheduled return data (part of saltstack#24237) (saltstack#33039)
  Don't append a newline when creating new content with blockreplace (saltstack#33049)
  Pass all data to batch.run() call when using --failhard (saltstack#33048)
  ...
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