-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
salt.hightstate no top file error but exit status is zero #6973
Comments
Yes, this is something we've been meaning to fix. Thanks for the report. |
So, I did some digging, and within the state module |
Please try again by passing |
Actually, the retcode wasn't being set right, I had modified salt/utils/init.py. Here's an example of the ret data in a highstate, which ends up getting passed to {'no_|-states_|-states_|-None': {
'comment': 'No Top file or external nodes data matches found',
'__run_num__': 0,
'changes': {},
'result': False,
'name': 'No States'
}
} There seems to be a bug here, so I changed this line to: if '_|-' in host: |
Hmm, that's a fix @thatch45 did a while back because I was having some issues... Can't remember what the issue was... |
(saltdev)[root@virtucentos saltdev]# salt -c etc/salt --retcode-passthrough virtucentos state.highstate
Usage: salt [options] '<target>' <function> [arguments]
salt: error: no such option: --retcode-passthrough |
Your fix might work because the will never be a key like |
I wonder if we can also add it to the |
Hmm, no, if returning info from several minions and only one failed? Or two failed with different exit codes... |
Sorry for the misleading in my initial comment about |
Added a test to make sure 'salt-call --retcode-passthrough' works as intended in #7224 |
…e for saltstack#6973 - expect a non-zero exit code when running "salt-call --retcode-passthrough state.highstate"
more bad return code issues - linking to issue #7013 |
This does not seem to be an error in the current version of Salt.
And with
@techdragon and @mitchellh is this the behaviour you would expect? |
@cachedout That looks good to me. @mitchellh can you confirm? |
Thanks for the reply @techdragon. I think this is fixed but we'll wait a bit for @mitchellh to respond, as you recommend. |
I don't have the repro case anymore to confirm, sorry. You can probably just safetly close this if you're confident it is fixed. |
I ran salt.highstate and it gave me an error about no top file and yet the exit status was still zero. This is breaking error detection in tools like Vagrant and Packer because they can't detect if it failed.
See here: https://gist.github.com/armon/843f44777db3cf6e20f9
The text was updated successfully, but these errors were encountered: