Salt: [Neon] Grains in minion startup event #54948

Created on 15 Jan 2020  路  2Comments  路  Source: saltstack/salt

I just discovered that this feature (when enabled) will append grains to other events sent from a minion (not just the start event):

Both commands:

sudo salt minion1 state.single event.send name='tag' data='{"data":"my event data"}'
sudo salt minion1 event.fire_master '{"data":"my event data"}' 'tag'

result in the following master event:

tag {
    "_stamp": "2020-01-15T07:55:24.548188",
    "cmd": "_minion_event",
    "data": {
        "data": "my event data"
    },
    "grains": {
        "machine_id": "599118d5b9619443ac3166fb0e59349e",
        "uuid": "599118d5-b961-9443-ac31-66fb0e59349e"
    },
    "id": "minion1",
    "pretag": null,
    "tag": "tag"
}

def _fire_master_minion_start(self) seems to be better suited for this code.

was that a suggestion that we should create a new PR to update this behavior? If so, would you mind opening an issue so it doesn't get lost here in the PR? Otherwise feel free to ignore this comment

@waynew Yes, that was a suggestion that something should be fixed - either the actual behavior, or the setting name and docs.

CC: @admd

Bug fixed-pending-your-verification severity-critical

Most helpful comment

@max-arnold @admd looks like the PR is merged ok to close this ticket knowing it is getting into the Neon release?

All 2 comments

thanks for opening up the issue with the details. really appreciate it.

@max-arnold @admd looks like the PR is merged ok to close this ticket knowing it is getting into the Neon release?

Was this page helpful?
0 / 5 - 0 ratings