On 04/22/2016 10:55 AM, Ferenc Wágner wrote: > Ken Gaillot <kgail...@redhat.com> writes: > >> Each alert may have any number of recipients configured. These values >> will simply be passed to the script as arguments. The first recipient >> will also be passed as the CRM_alert_recipient environment variable, >> for compatibility with existing scripts that only support one >> recipient. >> [...] >> In the current implementation, meta-attributes and instance attributes >> may also be specified within the <recipient> block, in which case they >> override any values specified in the <alert> block when sent to that >> recipient. > Sorry, I don't get this. The first paragraph above tells me that for a > given cluster event each <alert> is run once, with all recipients passed > as command line arguments to the alert executable. But a single > invocation can only have a single set of environmental variables, so how > can you override instance attributes for individual recipients? The paragraph above is indeed confusing or at least it can be understood in a way that doesn't reflect how it is implemented. If the script would just be called once the parameter itself could already be a list. Anyway - as it is implemented at the moment - the script is called for each of the recipients in parallel. This has a couple of advantages as it simplifies the script implementation (if you have problems with concurrency use just one recipient and make it a list), the timeout can be observed on a per recipient basis and if delivering to one recipient fails it doesn't affect the others. And each of these calls inherits a global set of environment variables while each of them can be overwritten on a per recipient basis. > >> Whether this stays in the final 1.1.15 release or not depends on >> whether people find this to be useful, or confusing. > Now guess..:) Like this it finally even might lead to detection and avoidance of confusion ;-)
_______________________________________________ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org