when use "salt '*' event.fire" or "salt-call event.fire" to fire the event on minion's local bus, how to catch the fired events on minions ? not on master
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Daniel,
Events can be caught in the master by way of a reactor.
-S
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/H5fRkJbcMIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
Ah! Interesting. There is a section of the docs that I perused the other day regarding firing events from a minion ( http://bit.ly/XUaOT2)
The example given uses salt-call. So that leaves us with only an execution module to work with.
I've been kinda hyper-focused on writing support modules for ovirt over the last several weeks,l rather than state formula construction, but I'm pretty sure that you can call an execution module as a depends-on target for a state definition. The catch is that the state would actually have to fire first, so depending on the use-case that could be adequate for your purpose. Perhaps a state that is hooked into the scheduler?
Some might consider a cron job for a salt-call, but I'm more partial towards keeping it salty.
-S
Aaand re-reading your response..
I think you might be able to deal with this by having your reactor fire off a state definition targeting the responding minion. The minion wouldn't exactly be waiting, but if you have a state (not hooked into its high-state pattern) that is only triggered by a particular message from the master, that might get you where you want to go. In a way, you could consider this a way to short-circuit the normal high-state run--having a portion of the minion's state-run depending on information returned from the master.
-S