Hello Andreas,<br><br>Thanks for the reply.<br><br>So can you please suggest what Stonith plugin should I use for the production release of my software. I have the following system requirements:<br>1. If a node in the cluster fails, it should be reboot and resources should re-start on the node.<br>
2. If the physical link between the nodes in a cluster fails then that node should be isolated (kind of a power down) and the resources should continue to run on the other nodes.<br><br>I have different types of resources e.g. primitive, master-slave and cone running on my system.<br>
<br>Thanks and regards<br>Neha Chatrath<br><br><br>Date: Mon, 17 Oct 2011 15:08:16 +0200<br>
From: Andreas Kurz <<a href="mailto:andreas@hastexo.com">andreas@hastexo.com</a>><br>
To: <a href="mailto:pacemaker@oss.clusterlabs.org">pacemaker@oss.clusterlabs.org</a><br>
Subject: Re: [Pacemaker] Problem in Stonith configuration<br>
Message-ID: <<a href="mailto:4E9C28C0.8070904@hastexo.com">4E9C28C0.8070904@hastexo.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hello,<br>
<br>
On 10/17/2011 12:34 PM, neha chatrath wrote:<br>
> Hello,<br>
> I am configuring a 2 node cluster with following configuration:<br>
><br>
> *[root@MCG1 init.d]# crm configure show<br>
><br>
> node $id="16738ea4-adae-483f-9d79-<div id=":53">b0ecce8050f4" mcg2 \<br>
> attributes standby="off"<br>
><br>
> node $id="3d507250-780f-414a-b674-8c8d84e345cd" mcg1 \<br>
> attributes standby="off"<br>
><br>
> primitive ClusterIP ocf:heartbeat:IPaddr \<br>
> params ip="192.168.1.204" cidr_netmask="255.255.255.0" nic="eth0:1" \<br>
><br>
> op monitor interval="40s" timeout="20s" \<br>
> meta target-role="Started"<br>
><br>
> primitive app1_fencing stonith:suicide \<br>
> op monitor interval="90" \<br>
> meta target-role="Started"<br>
><br>
> primitive myapp1 ocf:heartbeat:Redundancy \<br>
> op monitor interval="60s" role="Master" timeout="30s" on-fail="standby" \<br>
> op monitor interval="40s" role="Slave" timeout="40s" on-fail="restart"<br>
><br>
> primitive myapp2 ocf:mcg:Redundancy_myapp2 \<br>
> op monitor interval="60" role="Master" timeout="30" on-fail="standby" \<br>
> op monitor interval="40" role="Slave" timeout="40" on-fail="restart"<br>
><br>
> primitive myapp3 ocf:mcg:red_app3 \<br>
> op monitor interval="60" role="Master" timeout="30" on-fail="fence" \<br>
> op monitor interval="40" role="Slave" timeout="40" on-fail="restart"<br>
><br>
> ms ms_myapp1 myapp1 \<br>
> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"<br>
> notify="true"<br>
><br>
> ms ms_myapp2 myapp2 \<br>
> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"<br>
> notify="true"<br>
><br>
> ms ms_myapp3 myapp3 \<br>
> meta master-max="1" master-max-node="1" clone-max="2" clone-node-max="1"<br>
> notify="true"<br>
><br>
> colocation myapp1_col inf: ClusterIP ms_myapp1:Master<br>
><br>
> colocation myapp2_col inf: ClusterIP ms_myapp2:Master<br>
><br>
> colocation myapp3_col inf: ClusterIP ms_myapp3:Master<br>
><br>
> order myapp1_order inf: ms_myapp1:promote ClusterIP:start<br>
><br>
> order myapp2_order inf: ms_myapp2:promote ms_myapp1:start<br>
><br>
> order myapp3_order inf: ms_myapp3:promote ms_myapp2:start<br>
><br>
> property $id="cib-bootstrap-options" \<br>
> dc-version="1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1" \<br>
> cluster-infrastructure="Heartbeat" \<br>
> stonith-enabled="true" \<br>
> no-quorum-policy="ignore"<br>
><br>
> rsc_defaults $id="rsc-options" \<br>
> resource-stickiness="100" \<br>
> migration-threshold="3"<br>
> *<br>
> I start Heartbeat demon only one of the nodes e.g. mcg1. But none of the<br>
> resources (myapp, myapp1 etc) gets started even on this node.<br>
> Following is the output of "*crm_mon -f *" command:<br>
><br>
> *Last updated: Mon Oct 17 10:19:22 2011<br>
> Stack: Heartbeat<br>
> Current DC: mcg1 (3d507250-780f-414a-b674-8c8d84e345cd)- partition with<br>
> quorum<br>
> Version: 1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1<br>
> 2 Nodes configured, unknown expected votes<br>
> 5 Resources configured.<br>
> ============<br>
> Node mcg2 (16738ea4-adae-483f-9d79-b0ecce8050f4): UNCLEAN (offline)<br>
<br>
The cluster is waiting for a successful fencing event before starting<br>
all resources .. the only way to be sure the second node runs no resources.<br>
<br>
Since you are using suicide pluging this will never happen if Heartbeat<br>
is not started on that node. If this is only a _test_setup_ go with ssh<br>
or even null stonith plugin ... never use them on production systems!<br>
<br>
Regards,<br>
Andreas<br>
</div><br><br><div class="gmail_quote">On Mon, Oct 17, 2011 at 4:04 PM, neha chatrath <span dir="ltr"><<a href="mailto:nehachatrath@gmail.com">nehachatrath@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>I am configuring a 2 node cluster with following configuration:<br><br><b><span style="color:rgb(51, 102, 255)">[root@MCG1 init.d]# crm configure show</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">node $id="16738ea4-adae-483f-9d79-b0ecce8050f4" mcg2 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">attributes standby="off"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">node $id="3d507250-780f-414a-b674-8c8d84e345cd" mcg1 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">attributes standby="off"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">primitive ClusterIP ocf:heartbeat:IPaddr \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">params ip="192.168.1.204" cidr_netmask="255.255.255.0" nic="eth0:1" \</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">op monitor interval="40s" timeout="20s" \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">meta target-role="Started"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">primitive app1_fencing stonith:suicide \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">op monitor interval="90" \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">meta target-role="Started"</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">primitive myapp1 ocf:heartbeat:Redundancy \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">op monitor interval="60s" role="Master" timeout="30s" on-fail="standby" \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">op monitor interval="40s" role="Slave" timeout="40s" on-fail="restart"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">primitive myapp2 ocf:mcg:Redundancy_myapp2 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">op monitor interval="60" role="Master" timeout="30" on-fail="standby" \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">op monitor interval="40" role="Slave" timeout="40" on-fail="restart"</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">primitive myapp3 ocf:mcg:red_app3 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">op monitor interval="60" role="Master" timeout="30" on-fail="fence" \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">op monitor interval="40" role="Slave" timeout="40" on-fail="restart"</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">ms ms_myapp1 myapp1 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">ms ms_myapp2 myapp2 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">ms ms_myapp3 myapp3 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">meta master-max="1" master-max-node="1" clone-max="2" clone-node-max="1" notify="true"</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">colocation myapp1_col inf: ClusterIP ms_myapp1:Master</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">colocation myapp2_col inf: ClusterIP ms_myapp2:Master</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">colocation myapp3_col inf: ClusterIP ms_myapp3:Master</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">order myapp1_order inf: ms_myapp1:promote ClusterIP:start</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">order myapp2_order inf: ms_myapp2:promote ms_myapp1:start</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">order myapp3_order inf: ms_myapp3:promote ms_myapp2:start</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">property $id="cib-bootstrap-options" \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">dc-version="1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1" \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">cluster-infrastructure="Heartbeat" \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">stonith-enabled="true" \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">no-quorum-policy="ignore"</span><br style="color:rgb(51, 102, 255)"><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">rsc_defaults $id="rsc-options" \</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">resource-stickiness="100" \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">migration-threshold="3"</span><br style="color:rgb(51, 102, 255)">

</b><br>I start Heartbeat demon only one of the nodes e.g. mcg1. But none of the resources (myapp, myapp1 etc) gets started even on this node. <br>Following is the output of "<b style="color:rgb(51, 102, 255)">crm_mon -f </b>" command:<br>

<br><b><span style="color:rgb(51, 102, 255)">Last updated: Mon Oct 17 10:19:22 2011</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">Stack: Heartbeat</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">Current DC: mcg1 (3d507250-780f-414a-b674-8c8d84e345cd)- partition with quorum</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">Version: 1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">2 Nodes configured, unknown expected votes</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">5 Resources configured.</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">============</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">Node mcg2 (16738ea4-adae-483f-9d79-b0ecce8050f4): UNCLEAN (offline)</span><br style="color:rgb(51, 102, 255)">

<span style="color:rgb(51, 102, 255)">Online: [ mcg1 ]</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">app1_fencing    (stonith:suicide):Started mcg1</span><br style="color:rgb(51, 102, 255)">

<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">Migration summary:</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">* Node mcg1: </span><br></b><br>When I set "stonith_enabled" as false, then all my resources comes up.<br>

<br>Can somebody help me with STONITH configuration?  <br><br>Cheers<br><font color="#888888">Neha Chatrath<br>                          KEEP SMILING!!!!<br>
</font></blockquote></div><br>