-
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
[BUG] Reactor executes action multiple times #62638
Comments
Just tested this with 3005.1 (both master and minion), issue is still present. |
Edit: I happened to be using the only minion that I have setup for multi-master (and had forgotten). I am not seeing duplicate reactions now that I have removed one. |
Can confirm i'm seeing the same issue with reactors firing twice on the salt-master on 3005.1. I have my minions (3005.1) configured for multi-master, and if I remove the multi-master config and got back to a single master the reactors only fire once (which is expected). Edit: |
I can confirm the same issue, in my case all reactor calls are executed twice. Most of our infrastructure is idempotent, so it won't hurt the business. Unfortunately reactor actions take up twice as much time and resources, non-idempotent operations create additional artefacts because of this behaviour. |
For those of you that are looking for an alternative to Salt's builtin multi-master, keepalived is an alternative that does work. Once keepalived is configured properly and running I added this to my minion config:
|
Description
We use a state that sends an event to the bus. Reactor is then to run a state (
local.state.apply
) to the minion. In salt 3005 I've noticed that thelocal.state.apply
is executed multiple times on the same minion. When the event is sent by 1 or 2 minions at the same time, the reactor state is always executed twice. When using more minions, i.e. 10, the state is executed twice by some of the minions, but not all.Setup
/etc/salt/master:
/srv/salt/debug/send.sls:
/srv/salt/debug/reactor.sls:
/srv/salt/debug/action.sls:
salt -L 'domi1,domi2' state.apply debug.send
salt-run jobs.list_jobs --out=txt | sort -h |grep debug
salt-run jobs.lookup_jid --out=highstate --state-output=changes 20220908083859386338
salt-run jobs.lookup_jid --out=highstate --state-output=changes 20220908083906388266
Expected behavior
I expect
action.sls
to be executed once per event sent by minions.Versions Report
Additional context
The text was updated successfully, but these errors were encountered: