You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
A clear and concise description of what the bug is.
If I have a runner module that raises an exception the exit code of the salt-run command is still 0
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
A really simple test using a built-in runner
$ salt-run error.error name="Exception" message="This is an error."Exception occurred in runner error.error: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/salt/client/mixins.py", line 390, in low data["return"] = func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/salt/runners/error.py", line 29, in error salt.utils.error.raise_error(name=name, message=message) File "/usr/lib/python3.6/site-packages/salt/utils/error.py", line 33, in raise_error raise ex(message)Exception: This is an error.
$ echo$?0
Expected behavior
A clear and concise description of what you expected to happen.
Exit code not equal to 0 when the runner module raises an exception
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
salt-run 3004
Additional context
The only way I found to have a non-zero exit code for our custom runner is to return a dict with retcode set to non-zero
The text was updated successfully, but these errors were encountered:
Description
A clear and concise description of what the bug is.
If I have a runner module that raises an exception the exit code of the salt-run command is still 0
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
A really simple test using a built-in runner
Expected behavior
A clear and concise description of what you expected to happen.
Exit code not equal to 0 when the runner module raises an exception
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
The only way I found to have a non-zero exit code for our custom runner is to return a dict with
retcode
set to non-zeroThe text was updated successfully, but these errors were encountered: