<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 08/14/2017 12:32 PM, Sriram wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMvdjupRWL8mrz0W4NhJUUhmW9AJ73TnGQpeA_AtfHBndTzDUw@mail.gmail.com">
      <div dir="ltr">Hi Ken,
        <div><br>
        </div>
        <div>I used the alerts as well, seems to be not working.</div>
        <div><br>
        </div>
        <div>Please check the below configuration</div>
        <div>
          <div>[root@node1 alerts]# pcs config show</div>
          <div>Cluster Name:</div>
          <div>Corosync Nodes:</div>
          <div>Pacemaker Nodes:</div>
          <div> node1 node2 node3</div>
          <div><br>
          </div>
          <div>Resources:</div>
          <div> Resource: TRR (class=ocf provider=heartbeat
            type=TimingRedundancyRA)</div>
          <div>  Operations: start interval=0s timeout=60s
            (TRR-start-interval-0s)</div>
          <div>              stop interval=0s timeout=20s
            (TRR-stop-interval-0s)</div>
          <div>              monitor interval=10 timeout=20
            (TRR-monitor-interval-10)</div>
          <div><br>
          </div>
          <div>Stonith Devices:</div>
          <div>Fencing Levels:</div>
          <div><br>
          </div>
          <div>Location Constraints:</div>
          <div>  Resource: TRR</div>
          <div>    Enabled on: node1 (score:100)
            (id:location-TRR-node1-100)</div>
          <div>    Enabled on: node2 (score:200)
            (id:location-TRR-node2-200)</div>
          <div>    Enabled on: node3 (score:300)
            (id:location-TRR-node3-300)</div>
          <div>Ordering Constraints:</div>
          <div>Colocation Constraints:</div>
          <div>Ticket Constraints:</div>
          <div><br>
          </div>
          <div>Alerts:</div>
          <div> Alert: alert_file
            (path=/usr/share/pacemaker/alert_file.sh)</div>
          <div>  Options: debug_exec_order=false</div>
          <div>  Meta options: timeout=15s</div>
          <div>  Recipients:</div>
          <div>   Recipient: recipient_alert_file_id
            (value=/usr/share/pacemaker/alert_file.log)</div>
        </div>
      </div>
    </blockquote>
    <br>
    Did you pre-create the file with proper rights? Be aware that the
    alert-agent<br>
    is called as user hacluster.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAMvdjupRWL8mrz0W4NhJUUhmW9AJ73TnGQpeA_AtfHBndTzDUw@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
          <div>Resources Defaults:</div>
          <div> resource-stickiness: INFINITY</div>
          <div>Operations Defaults:</div>
          <div> No defaults set</div>
          <div><br>
          </div>
          <div>Cluster Properties:</div>
          <div> cluster-infrastructure: corosync</div>
          <div> dc-version: 1.1.15-11.el7_3.4-e174ec8</div>
          <div> default-action-timeout: 240</div>
          <div> have-watchdog: false</div>
          <div> no-quorum-policy: ignore</div>
          <div> placement-strategy: balanced</div>
          <div> stonith-enabled: false</div>
          <div> symmetric-cluster: false</div>
          <div><br>
          </div>
          <div>Quorum:</div>
          <div>  Options:</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>/usr/share/pacemaker/alert_file.sh does not get called
          whenever I trigger a scenario for failover.<br>
        </div>
        <div>Please let me know if I m missing anything. <br>
        </div>
      </div>
    </blockquote>
    <br>
    Do you get any logs - like for startup of resources - or nothing at
    all?<br>
    <br>
    Regards,<br>
    Klaus<br>
    <br>
    <blockquote type="cite"
cite="mid:CAMvdjupRWL8mrz0W4NhJUUhmW9AJ73TnGQpeA_AtfHBndTzDUw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Regards,</div>
        <div class="gmail_extra">Sriram.</div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, Aug 8, 2017 at 8:29 PM, Ken
            Gaillot <span dir="ltr">&lt;<a
                href="mailto:kgaillot@redhat.com" target="_blank"
                moz-do-not-send="true">kgaillot@redhat.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div class="gmail-HOEnZb">
                <div class="gmail-h5">On Tue, 2017-08-08 at 17:40 +0530,
                  Sriram wrote:<br>
                  &gt; Hi Ulrich,<br>
                  &gt;<br>
                  &gt;<br>
                  &gt; Please see inline.<br>
                  &gt;<br>
                  &gt; On Tue, Aug 8, 2017 at 2:01 PM, Ulrich Windl<br>
                  &gt; &lt;<a
                    href="mailto:Ulrich.Windl@rz.uni-regensburg.de"
                    moz-do-not-send="true">Ulrich.Windl@rz.uni-<wbr>regensburg.de</a>&gt;
                  wrote:<br>
                  &gt;         &gt;&gt;&gt; Sriram &lt;<a
                    href="mailto:sriram.ec@gmail.com"
                    moz-do-not-send="true">sriram.ec@gmail.com</a>&gt;
                  schrieb am <a href="tel:08.08.2017"
                    value="+498082017" moz-do-not-send="true">08.08.2017</a>
                  um<br>
                  &gt;         09:30 in Nachricht<br>
                  &gt;         &lt;CAMvdjurcQc6t=ZfGr=<wbr>cRL25Xq0Je9h9F_TvZXyxVAn3n<br>
                  &gt;         +<a href="mailto:Dvcgw@mail.gmail.com"
                    moz-do-not-send="true">Dvcgw@mail.gmail.com</a>&gt;:<br>
                  &gt;         &gt; Hi Ken &amp; Jan,<br>
                  &gt;         &gt;<br>
                  &gt;         &gt; In the cluster we have, there is
                  only one resource running.<br>
                  &gt;         Its a OPT-IN<br>
                  &gt;         &gt; cluster with resource-stickiness set
                  to INFINITY.<br>
                  &gt;         &gt;<br>
                  &gt;         &gt; Just to clarify my question, lets
                  take a scenario where<br>
                  &gt;         there are four<br>
                  &gt;         &gt; nodes N1, N2, N3, N4<br>
                  &gt;         &gt; a. N1 comes up first, starts the
                  cluster.<br>
                  &gt;<br>
                  &gt;         The cluster will start once it has a
                  quorum.<br>
                  &gt;<br>
                  &gt;         &gt; b. N1 Checks that there is no
                  resource running, so it will<br>
                  &gt;         add the<br>
                  &gt;         &gt; resource(R) with the some location
                  constraint(lets say score<br>
                  &gt;         100)<br>
                  &gt;         &gt; c. So Resource(R) runs in N1 now.<br>
                  &gt;         &gt; d. N2 comes up next, checks that
                  resource(R) is already<br>
                  &gt;         running in N1, so<br>
                  &gt;         &gt; it will update the location
                  constraint(lets say score 200)<br>
                  &gt;         &gt; e. N3 comes up next, checks that
                  resource(R) is already<br>
                  &gt;         running in N1, so<br>
                  &gt;         &gt; it will update the location
                  constraint(lets say score 300)<br>
                  &gt;<br>
                  &gt;         See my remark on quorum above.<br>
                  &gt;<br>
                  &gt; Yes you are right, I forgot to mention it.<br>
                  &gt;<br>
                  &gt;<br>
                  &gt;         &gt; f.  N4 comes up next, checks that
                  resource(R) is already<br>
                  &gt;         running in N1, so<br>
                  &gt;         &gt; it will update the location
                  constraint(lets say score 400)<br>
                  &gt;         &gt; g. For the some reason, if N1 goes
                  down, resource(R) shifts<br>
                  &gt;         to N4(as its<br>
                  &gt;         &gt; score is higher than anyone).<br>
                  &gt;         &gt;<br>
                  &gt;         &gt; In this case is it possible to
                  notify the nodes N2, N3 that<br>
                  &gt;         newly elected<br>
                  &gt;         &gt; active node is N4 ?<br>
                  &gt;<br>
                  &gt;         What type of notification, and what would
                  the node do with it?<br>
                  &gt;         Any node in the cluster always has up to
                  date configuration<br>
                  &gt;         information. So it knows the status of
                  the other nodes also.<br>
                  &gt;<br>
                  &gt;<br>
                  &gt; I agree that the node always has upto date
                  configuration information,<br>
                  &gt; but an application or a thread needs to poll for
                  that information. Is<br>
                  &gt; there any way, where the notifications are
                  received through some<br>
                  &gt; action function in RA. ?<br>
                  <br>
                </div>
              </div>
              Ah, I misunderstood your situation, I thought you had a
              cloned resource.<br>
              <br>
              For that, the alerts feature (available in Pacemaker
              1.1.15 and later)<br>
              might be useful:<br>
              <br>
              <a
href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm139900098676896"
                rel="noreferrer" target="_blank" moz-do-not-send="true">http://clusterlabs.org/doc/en-<wbr>US/Pacemaker/1.1-pcs/html-<wbr>single/Pacemaker_Explained/<wbr>index.html#idm139900098676896</a><br>
              <div class="gmail-HOEnZb">
                <div class="gmail-h5"><br>
                  <br>
                  &gt;<br>
                  &gt;<br>
                  &gt; Regards,<br>
                  &gt; Sriram.<br>
                  &gt;<br>
                  &gt;         &gt;<br>
                  &gt;         &gt; I went through clone notifications
                  and master-slave, Iooks<br>
                  &gt;         like it either<br>
                  &gt;         &gt; requires identical
                  resources(Anonymous) or Unique or<br>
                  &gt;         Stateful resources to<br>
                  &gt;         &gt; be running<br>
                  &gt;         &gt; in all the nodes of the cluster,
                  where as in our case there<br>
                  &gt;         is only<br>
                  &gt;         &gt; resource running in the whole
                  cluster.<br>
                  &gt;<br>
                  &gt;         Maybe the main reason for not having
                  notifications is that if<br>
                  &gt;         a node fails hard, it won't be able to
                  send out much status<br>
                  &gt;         information to the other nodes.<br>
                  &gt;<br>
                  &gt;         Regards,<br>
                  &gt;         Ulrich<br>
                  &gt;<br>
                  &gt;         &gt;<br>
                  &gt;         &gt; Regards,<br>
                  &gt;         &gt; Sriram.<br>
                  &gt;         &gt;<br>
                  &gt;         &gt;<br>
                  &gt;         &gt;<br>
                  &gt;         &gt;<br>
                  &gt;         &gt; On Mon, Aug 7, 2017 at 11:28 AM,
                  Sriram<br>
                  &gt;         &lt;<a href="mailto:sriram.ec@gmail.com"
                    moz-do-not-send="true">sriram.ec@gmail.com</a>&gt;
                  wrote:<br>
                  &gt;         &gt;<br>
                  &gt;         &gt;&gt;<br>
                  &gt;         &gt;&gt; Thanks Ken, Jan. Will look into
                  the clone notifications.<br>
                  &gt;         &gt;&gt;<br>
                  &gt;         &gt;&gt; Regards,<br>
                  &gt;         &gt;&gt; Sriram.<br>
                  &gt;         &gt;&gt;<br>
                  &gt;         &gt;&gt; On Sat, Aug 5, 2017 at 1:25 AM,
                  Ken Gaillot<br>
                  &gt;         &lt;<a href="mailto:kgaillot@redhat.com"
                    moz-do-not-send="true">kgaillot@redhat.com</a>&gt;
                  wrote:<br>
                  &gt;         &gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; On Thu, 2017-08-03 at 12:31
                  +0530, Sriram wrote:<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; Hi Team,<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; We have a four node
                  cluster (1 active : 3 standby) in<br>
                  &gt;         our lab for a<br>
                  &gt;         &gt;&gt;&gt; &gt; particular service. If
                  the active node goes down, one of<br>
                  &gt;         the three<br>
                  &gt;         &gt;&gt;&gt; &gt; standby node  becomes
                  active. Now there will be (1<br>
                  &gt;         active :  2<br>
                  &gt;         &gt;&gt;&gt; &gt; standby : 1 offline).<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; Is there any way where
                  this newly elected node sends<br>
                  &gt;         notification to<br>
                  &gt;         &gt;&gt;&gt; &gt; the remaining 2 standby
                  nodes about its new status ?<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; Hi Sriram,<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; This depends on how your
                  service is configured in the<br>
                  &gt;         cluster.<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; If you have a clone or
                  master/slave resource, then clone<br>
                  &gt;         notifications<br>
                  &gt;         &gt;&gt;&gt; is probably what you want
                  (not alerts, which is the path<br>
                  &gt;         you were going<br>
                  &gt;         &gt;&gt;&gt; down -- alerts are designed
                  to e.g. email a system<br>
                  &gt;         administrator after<br>
                  &gt;         &gt;&gt;&gt; an important event).<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; For details about clone
                  notifications, see:<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         <a
                    href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-sing"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://clusterlabs.org/doc/en-<wbr>US/Pacemaker/1.1-pcs/html-sing</a><br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         le/Pacemaker_Explained/index.<wbr>html#_clone_resource_agent_<wbr>requirements<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; The RA must support the
                  "notify" action, which will be<br>
                  &gt;         called when a<br>
                  &gt;         &gt;&gt;&gt; clone instance is started or
                  stopped. See the similar<br>
                  &gt;         section later for<br>
                  &gt;         &gt;&gt;&gt; master/slave resources for
                  additional information. See the<br>
                  &gt;         mysql or<br>
                  &gt;         &gt;&gt;&gt; pgsql resource agents for
                  examples of notify<br>
                  &gt;         implementations.<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; I was exploring
                  "notification agent" and "notification<br>
                  &gt;         recipient"<br>
                  &gt;         &gt;&gt;&gt; &gt; features, but that
                  doesn't seem to<br>
                  &gt;         work. /etc/sysconfig/notify.sh<br>
                  &gt;         &gt;&gt;&gt; &gt; doesn't get invoked
                  even in the newly elected active<br>
                  &gt;         node.<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; Yep, that's something
                  different altogether -- it's only<br>
                  &gt;         enabled on RHEL<br>
                  &gt;         &gt;&gt;&gt; systems, and solely for
                  backward compatibility with an<br>
                  &gt;         early<br>
                  &gt;         &gt;&gt;&gt; implementation of the alerts
                  interface. The new alerts<br>
                  &gt;         interface is more<br>
                  &gt;         &gt;&gt;&gt; flexible, but it's not
                  designed to send information<br>
                  &gt;         between cluster<br>
                  &gt;         &gt;&gt;&gt; nodes -- it's designed to
                  send information to something<br>
                  &gt;         external to the<br>
                  &gt;         &gt;&gt;&gt; cluster, such as a human, or
                  an SNMP server, or a<br>
                  &gt;         monitoring system.<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; Cluster Properties:<br>
                  &gt;         &gt;&gt;&gt; &gt; 
                  cluster-infrastructure: corosync<br>
                  &gt;         &gt;&gt;&gt; &gt;  dc-version:
                  1.1.17-e2e6cdce80<br>
                  &gt;         &gt;&gt;&gt; &gt; 
                  default-action-timeout: 240<br>
                  &gt;         &gt;&gt;&gt; &gt;  have-watchdog: false<br>
                  &gt;         &gt;&gt;&gt; &gt;  no-quorum-policy:
                  ignore<br>
                  &gt;         &gt;&gt;&gt; &gt;  notification-agent:
                  /etc/sysconfig/notify.sh<br>
                  &gt;         &gt;&gt;&gt; &gt; 
                  notification-recipient: /var/log/notify.log<br>
                  &gt;         &gt;&gt;&gt; &gt;  placement-strategy:
                  balanced<br>
                  &gt;         &gt;&gt;&gt; &gt;  stonith-enabled: false<br>
                  &gt;         &gt;&gt;&gt; &gt;  symmetric-cluster:
                  false<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; I m using the following
                  versions of pacemaker and<br>
                  &gt;         corosync.<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; /usr/sbin #
                  ./pacemakerd --version<br>
                  &gt;         &gt;&gt;&gt; &gt; Pacemaker 1.1.17<br>
                  &gt;         &gt;&gt;&gt; &gt; Written by Andrew
                  Beekhof<br>
                  &gt;         &gt;&gt;&gt; &gt; /usr/sbin # ./corosync
                  -v<br>
                  &gt;         &gt;&gt;&gt; &gt; Corosync Cluster
                  Engine, version '2.3.5'<br>
                  &gt;         &gt;&gt;&gt; &gt; Copyright (c) 2006-2009
                  Red Hat, Inc.<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; Can you please suggest
                  if I m doing anything wrong or if<br>
                  &gt;         there any<br>
                  &gt;         &gt;&gt;&gt; &gt; other mechanisms to
                  achieve this ?<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt;<br>
                  &gt;         &gt;&gt;&gt; &gt; Regards,<br>
                  &gt;         &gt;&gt;&gt; &gt; Sriram.<br>
                  <br>
                </div>
              </div>
              <div class="gmail-HOEnZb">
                <div class="gmail-h5">--<br>
                  Ken Gaillot &lt;<a href="mailto:kgaillot@redhat.com"
                    moz-do-not-send="true">kgaillot@redhat.com</a>&gt;<br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  ______________________________<wbr>_________________<br>
                  Users mailing list: <a
                    href="mailto:Users@clusterlabs.org"
                    moz-do-not-send="true">Users@clusterlabs.org</a><br>
                  <a
                    href="http://lists.clusterlabs.org/mailman/listinfo/users"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
                  <br>
                  Project Home: <a href="http://www.clusterlabs.org"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://www.clusterlabs.org</a><br>
                  Getting started: <a
                    href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
                  Bugs: <a href="http://bugs.clusterlabs.org"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://bugs.clusterlabs.org</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://lists.clusterlabs.org/mailman/listinfo/users">http://lists.clusterlabs.org/mailman/listinfo/users</a>

Project Home: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="moz-txt-link-freetext" href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>