Open vosscodes opened 5 years ago
Hey, thanks for the report! This is super interesting - There's a specific commit where this EX_STATE_FAILURE
was introduced - I'm pretty sure the theory is correct that upgrading salt during a state run is what causes the problem, mainly due to a race condition when we're doing lazy importing.
I have some theories about how to reproduce this, but at least as far as I've found we don't currently have any guarantees about upgrading salt in the middle of running salt (or a highstate, anyway).
Hey, forgot to reply to this one. If you need any help testing on this, I'd be happy to lend a hand.
I don't recall seeing any guarantees either, but I think this will remain an issue as any pkg.uptodate
state will trigger this if Salt has released an update without the user knowing. If it's not possible to guarantee upgrading during a highstate, would excluding Salt packages from pkg.uptodate
states be possible? I wasn't able to get it working with kwargs.
General excludes (#27894) and/or a boolean value like git.latest
's force_refresh
to force (not) updating Salt packages would be extremely useful for enterprise use.
I'm a fan of that idea/approach. I'm not sure if, with our current architecture, we could make any guarantees for an update during a state run.
If there's a way to exclude Salt from a non-verbose update, that seems like a great idea to me.
Bumping into this bug too, have you found a fix or a way round it ?
Update Salt, restart the services, and highstate again. This happens when salt updates itself during a highstate, which should succeed but will cause everything after to fail.
cmd.run
is throwing this exception on MacOS 10.15.5/Darwin 19.5.0 with Salt 3001. Is there any workaround?
[INFO ] Executing command 'curl -Lo /usr/local/devspace-v4.13.1/bin/devspace https://github.com/devspace-cloud/devspace/releases/download/v4.13.1/devspace-darwin-amd64' in group 'staff' in directory '/Users/myusername'
[DEBUG ] env command: ['sudo', '-g', 'staff', '-i', '--', '/usr/local/Cellar/salt/3001/libexec/bin/python3.8']
[ERROR ] Exception occurred in preexec_fn.
@noelmcloughlin I am running 3001 on both master and mac minion. Mac OS X 10.15.5-10 and cmd.run seems to be working for me.
me@salt:~$ sudo salt -G 'os:macos' cmd.run 'uptime' mac: 10:24 up 21 mins, 2 users, load averages: 11.49 12.17 11.49
However, I am running salt installed via the pkg installer and not brew. I am not sure if that could be an issue.
Description of Issue/Question
I've run into a git/cmd failure followed by unhandled global exception on Suse Tumbleweed. Salt was updated to 2019.2 in an earlier state, and this did not repeat on a second run, so I believe this is related to cmdmod.py and updating Salt, as suggested in #52017
Setup
Masterless minion calling itself locally with salt-call
Error
This first trace repeats for each git state. The command returns 1 again when repeating the job a second time, but there was no traceback and the states/job finished normally.
Several very similar errors related to cmd.py show up next:
These two are identical, excepting line 896 vs 1165 of cmd.py:
Finally, an AttributeError occurs:
Versions Report