[ClusterLabs] Alert notifications on all nodes for any event type on one resource

Klaus Wenninger kwenning at redhat.com
Mon Apr 24 09:34:26 EDT 2017


On 04/21/2017 08:08 PM, Rekha Panda wrote:
> Hi,
> First, hopefully I am posting this in the right email thread! :)
>
> So in a 2 node cluster, we add resources (2 for now, one in each node)
> for monitoring, which is located one in each node. What we expect is
> any change in the event type (start/stop) for the resource, we get an
> alert (which currently is directed to run a shell script).
> What we notice is that the script runs only for event change of a
> resource in a particular node. We would like to run the script on both
> nodes, which we can then decide how we handle it in the script.
>
> Is there a way to run the script on both nodes for one resource event
> change? If not, is there a plan to support it in the future?

Unless we don't see a really strong use-case this is not very likely to
happen I guess ...

Currently the processes running the alert-agents are spawned from
crmd-context.
So if a resource is not to be started/stopped on a particular node and
this node is
not the DC this type of information is - at the moment - not passing by the
crmd on this node.
Broadcasting this information to all nodes (no IP broadcast used by
corosync at
least by default) would mean an enormous increase of cluster-communication.
Thus it rather would have to be done just for certain resources based on
rules.
And that would mean quite some implementation-effort - at least without a
smart idea ;-)

I don't exactly know what you are doing but having a dependent, cloned not
colocated resource, where you put your stuff into the RA, might be suitable
for your scenario. The clones would be started after start of the to be
observed resource and they would be stopped prior to stopping it.
You wouldn't see immediately on which node it would be to happen but you
could still use 'crm_resource --resource myResource --locate' to tell you.

>
> Thanks,
> Rekha
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.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


-- 
Klaus Wenninger

Senior Software Engineer, EMEA ENG Openstack Infrastructure

Red Hat

kwenning at redhat.com   





More information about the Users mailing list