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

plugin doesn't detect a non zero exit status returned from minion cmd.run function #18

Closed
zerthimon opened this issue Apr 8, 2016 · 7 comments

Comments

@zerthimon
Copy link

Salt detects this well:

root@master:~# salt minion cmd.run 'true 1'
minion:
root@master:~# echo $?
0
root@master:~# salt minion cmd.run 'false 1'
minion:
ERROR: Minions returned with non-zero exit code
root@master:~# echo $?
11
root@master:~#

The plugin doesn't detect the error and continues the job.
It would rock if plugin detects this situation and fails the job (or not ? config parameter ?)

@mchugh19
Copy link

mchugh19 commented Apr 8, 2016

Thanks for reporting. I'll get on it

@mchugh19
Copy link

Hmmm. It appears this isn't exposed through the salt-api.

Here's the output from cmd.run 'false 1':

{
    "return": [
        {
            "web1": ""
        }
    ]
}

So first we'll need salt-api updated as mentioned in saltstack/salt/issues/18510

@zerthimon
Copy link
Author

So, salt CLI command receives the exit status from minion and exits correctly, but salt-api doesn't expose it to the caller, right?

@mchugh19
Copy link

mchugh19 commented Apr 11, 2016 via email

@mchugh19
Copy link

The salt-api has been enhanced with the 2017.7 release, and this will be supported in the next release of the Jenkins plugin.

@zerthimon
Copy link
Author

Hell yeah !!!

@mchugh19
Copy link

mchugh19 commented Aug 7, 2018

This was corrected in the 3.2.0 release. It should be available within the next 24 hours.

@mchugh19 mchugh19 closed this as completed Aug 7, 2018
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

No branches or pull requests

2 participants