Open lorengordon opened 7 years ago
@lorengordon i can see where your logic is here, because if someone adds jinja to a sls file to only run on certain conditions you can expect some files to be empty.
Heres a docker container to quickly replicate this issue:
docker run -it -v /home/ch3ll/git/salt/:/testing/ ch3ll/issues:39172
(where /home/ch3ll/git/salt is a local cloned git repo of salt)salt-call --local --retcode-passthrough state.sls test
echo $?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Should probably be kept open...
Thank you for updating this issue. It is no longer marked as stale.
I'm also facing the same issue, even without passing salt-call
the --retcode-passthrough
flag:
$ python3 .tmp/thin/salt-call -c /tmp/removeme/setupify --state-output=changes state.apply setupify.nosudo
.tmp/thin/py3/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (2.3.0) doesn't match a supported version!
RequestsDependencyWarning)
local:
Summary for local
-----------
Succeeded: 0
Failed: 0
-----------
Total states run: 0
Total run time: 0.000 ms
$ root@e1cd9c2fa617:/tmp/removeme/setupify# echo $?
2
Anyone knows how I could fix this issue?
what version are you seeing this on? on 2019.2.2 im getting an exit code of 1. Not saying the issue is resolved with that, but just curious why we are seeing different exit codes without --retcode-passthrough
Description of Issue/Question
If I create an empty sls file (or it is rendered to an empty sls file), then using salt-call with
--retcode-passthrough
will return an exit code of 2. This is essentially a noop, so I'm not sure why that would be considered an error.Setup
Steps to Reproduce Issue
Versions Report