<div dir="ltr">Hi Ken & Jan,<div><br></div><div>In the cluster we have, there is only one resource running. Its a OPT-IN cluster with resource-stickiness set to INFINITY.</div><div><br></div><div>Just to clarify my question, lets take a scenario where there are four nodes N1, N2, N3, N4<br></div><div>a. N1 comes up first, starts the cluster.</div><div>b. N1 Checks that there is no resource running, so it will add the resource(R) with the some location constraint(lets say score 100)</div><div>c. So Resource(R) runs in N1 now.</div><div>d. N2 comes up next, checks that resource(R) is already running in N1, so it will update the location constraint(lets say score 200)</div><div>e. N3 comes up next, checks that resource(R) is already running in N1, so it will update the location constraint(lets say score 300)</div><div>f. N4 comes up next, checks that resource(R) is already running in N1, so it will update the location constraint(lets say score 400)</div><div>g. For the some reason, if N1 goes down, resource(R) shifts to N4(as its score is higher than anyone).<br></div><div><br></div><div>In this case is it possible to notify the nodes N2, N3 that newly elected active node is N4 ?</div><div><br></div><div>I went through clone notifications and master-slave, Iooks like it either requires identical resources(Anonymous) or Unique or Stateful resources to be running</div><div>in all the nodes of the cluster, where as in our case there is only resource running in the whole cluster.</div><div><br></div><div>Regards,</div><div>Sriram.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 7, 2017 at 11:28 AM, Sriram <span dir="ltr"><<a href="mailto:sriram.ec@gmail.com" target="_blank">sriram.ec@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>Thanks Ken, Jan. Will look into the clone notifications.<div><br></div><div>Regards,<br>Sriram.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 5, 2017 at 1:25 AM, Ken Gaillot <span dir="ltr"><<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Thu, 2017-08-03 at 12:31 +0530, Sriram wrote:<br>
><br>
> Hi Team,<br>
><br>
><br>
> We have a four node cluster (1 active : 3 standby) in our lab for a<br>
> particular service. If the active node goes down, one of the three<br>
> standby node becomes active. Now there will be (1 active : 2<br>
> standby : 1 offline).<br>
><br>
><br>
> Is there any way where this newly elected node sends notification to<br>
> the remaining 2 standby nodes about its new status ?<br>
<br>
</span>Hi Sriram,<br>
<br>
This depends on how your service is configured in the cluster.<br>
<br>
If you have a clone or master/slave resource, then clone notifications<br>
is probably what you want (not alerts, which is the path you were going<br>
down -- alerts are designed to e.g. email a system administrator after<br>
an important event).<br>
<br>
For details about clone notifications, see:<br>
<br>
<a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_clone_resource_agent_requirements" rel="noreferrer" target="_blank">http://clusterlabs.org/doc/en-<wbr>US/Pacemaker/1.1-pcs/html-sing<wbr>le/Pacemaker_Explained/index.<wbr>html#_clone_resource_agent_<wbr>requirements</a><br>
<br>
The RA must support the "notify" action, which will be called when a<br>
clone instance is started or stopped. See the similar section later for<br>
master/slave resources for additional information. See the mysql or<br>
pgsql resource agents for examples of notify implementations.<br>
<span><br>
> I was exploring "notification agent" and "notification recipient"<br>
> features, but that doesn't seem to work. /etc/sysconfig/notify.sh<br>
> doesn't get invoked even in the newly elected active node.<br>
<br>
</span>Yep, that's something different altogether -- it's only enabled on RHEL<br>
systems, and solely for backward compatibility with an early<br>
implementation of the alerts interface. The new alerts interface is more<br>
flexible, but it's not designed to send information between cluster<br>
nodes -- it's designed to send information to something external to the<br>
cluster, such as a human, or an SNMP server, or a monitoring system.<br>
<span><br>
<br>
> Cluster Properties:<br>
> cluster-infrastructure: corosync<br>
> dc-version: 1.1.17-e2e6cdce80<br>
> default-action-timeout: 240<br>
> have-watchdog: false<br>
> no-quorum-policy: ignore<br>
> notification-agent: /etc/sysconfig/notify.sh<br>
> notification-recipient: /var/log/notify.log<br>
> placement-strategy: balanced<br>
> stonith-enabled: false<br>
> symmetric-cluster: false<br>
><br>
><br>
><br>
><br>
> I m using the following versions of pacemaker and corosync.<br>
><br>
><br>
> /usr/sbin # ./pacemakerd --version<br>
> Pacemaker 1.1.17<br>
> Written by Andrew Beekhof<br>
> /usr/sbin # ./corosync -v<br>
> Corosync Cluster Engine, version '2.3.5'<br>
> Copyright (c) 2006-2009 Red Hat, Inc.<br>
><br>
><br>
> Can you please suggest if I m doing anything wrong or if there any<br>
> other mechanisms to achieve this ?<br>
><br>
><br>
> Regards,<br>
> Sriram.<br>
><br>
><br>
</span>> ______________________________<wbr>_________________<br>
> Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
> <a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
><br>
> Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
> Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
> Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
--<br>
Ken Gaillot <<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>