Skip to content
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] 3006.x / 3007.x Windows minion throws duplicate custom event in multimaster config #66933

Open
amalaguti opened this issue Sep 27, 2024 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@amalaguti
Copy link

amalaguti commented Sep 27, 2024

Description
Windows minion (3006.x and 3007.1) configured in multimaster config (two masters) throws duplicate custom event when using salt-call event.send or the event.send state module. causing duplicate reactor executions on the same master

salt-call event.send hello/world


salt/auth	{
    "_stamp": "2024-09-27T22:35:27.398730",
    "act": "accept",
    "id": "minion-win-1",
    "pub": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt5l76Z2TNrTeSZJOK7ga\nTUrvQozspW3shL7TYSfGGFJzsY9GD4GBYF9UO68I5/jPYHWh+8se+8QF8mh6y4TQ\nbQU4GN4oSKCAyT8CdwjZnQSpqtgDHenEgI8a4oX1yYPatt/EtGj3MKvMSn5VMVVn\nPnsPzWWS8r25wkwHVDadP2oZrO51fM6niEKbCoXOtgwIp4dzOJMpaZU4Jeu2f+BJ\n3tr5E8W7Q/zJoBEacjlKfrrKwzfS2Ygu9+lefAc4VX5ug9wFgst0W/bmRHa9Ma0L\nNCvzUY0+WFI4qVudsijxOVpvY7nzJTunyCgmfXbJB7968nKHds6g4+xvR7qJ2JPZ\n/wIDAQAB\n-----END PUBLIC KEY-----",
    "result": true
}
minion/refresh/minion-win-1	{
    "Minion data cache refresh": "minion-win-1",
    "_stamp": "2024-09-27T22:35:27.796261"
}
hello/world	{
    "_stamp": "2024-09-27T22:35:27.964432",
    "cmd": "_minion_event",
    "data": {
        "__pub_fun": "event.send",
        "__pub_jid": "20240927223527882312",
        "__pub_pid": 3700,
        "__pub_tgt": "salt-call"
    },
    "id": "minion-win-1",
    "tag": "hello/world"
}
hello/world	{
    "_stamp": "2024-09-27T22:35:27.989619",
    "cmd": "_minion_event",
    "data": {
        "__pub_fun": "event.send",
        "__pub_jid": "20240927223527882312",
        "__pub_pid": 3700,
        "__pub_tgt": "salt-call"
    },
    "id": "minion-win-1",
    "tag": "hello/world"
}
salt/job/20240927223528011683/ret/minion-win-1	{
    "_stamp": "2024-09-27T22:35:28.012717",
    "arg": [
        "hello/world"
    ],
    "cmd": "_return",
    "fun": "event.send",
    "fun_args": [
        "hello/world"
    ],
    "id": "minion-win-1",
    "jid": "20240927223528011683",
    "retcode": 0,
    "return": true,
    "tgt": "minion-win-1",
    "tgt_type": "glob"
}

A few more findings, the issue seems caused by the combination of salt-call and event.send module.

If making the call from the master, using instead salt <minion> event.send or executing a state with the event.send module, the event is generated only once on each master, but on both masters, which I also think it's wrong, the event should be seen only in the master making the call like in other modules.
For instance, using another module like test.echo or test.ping, the return event is seen only in the calling master event bus, not in the other one.

using salt-call with --master option sends the event only to the desired master
salt-call event.send --master=172.21.0.11 some/event

Setup
I've seen these issues in 3006 and 3007, after 3006.8 a similar issue with the /start event seemed fixed.
I'm testing this now with 3007.1 and Windows minion.

Expected behavior
Only the first active master should get only one event

@amalaguti amalaguti added Bug broken, incorrect, or confusing behavior needs-triage labels Sep 27, 2024
@amalaguti
Copy link
Author

it worth to mention #66341 which seems related, about duplicate /start events in recent past versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant