Hello,<br>
<br>
Minor updates in the first requirement.<br>
1. If a resource fails, node should reboot (through fencing mechanism) 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>Apologies for the inconvenience.<br><br>Thanks and regards<br>Neha Chatrath<br><br><div class="gmail_quote">On Tue, Oct 18, 2011 at 12:08 PM, neha chatrath <span dir="ltr">&lt;<a href="mailto:nehachatrath@gmail.com">nehachatrath@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">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 &lt;<a href="mailto:andreas@hastexo.com" target="_blank">andreas@hastexo.com</a>&gt;<br>
To: <a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a><br>
Subject: Re: [Pacemaker] Problem in Stonith configuration<br>
Message-ID: &lt;<a href="mailto:4E9C28C0.8070904@hastexo.com" target="_blank">4E9C28C0.8070904@hastexo.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hello,<div class="im"><br>
<br>
On 10/17/2011 12:34 PM, neha chatrath wrote:<br>
&gt; Hello,<br>
&gt; I am configuring a 2 node cluster with following configuration:<br>
&gt;<br></div>
&gt; *[root@MCG1 init.d]# crm configure show<br>
&gt;<br>
&gt; node $id=&quot;16738ea4-adae-483f-9d79-<div><div><div></div><div class="h5">b0ecce8050f4&quot; mcg2 \<br>
&gt; attributes standby=&quot;off&quot;<br>
&gt;<br>
&gt; node $id=&quot;3d507250-780f-414a-b674-8c8d84e345cd&quot; mcg1 \<br>
&gt; attributes standby=&quot;off&quot;<br>
&gt;<br>
&gt; primitive ClusterIP ocf:heartbeat:IPaddr \<br>
&gt; params ip=&quot;192.168.1.204&quot; cidr_netmask=&quot;255.255.255.0&quot; nic=&quot;eth0:1&quot; \<br>
&gt;<br>
&gt; op monitor interval=&quot;40s&quot; timeout=&quot;20s&quot; \<br>
&gt; meta target-role=&quot;Started&quot;<br>
&gt;<br>
&gt; primitive app1_fencing stonith:suicide \<br>
&gt; op monitor interval=&quot;90&quot; \<br>
&gt; meta target-role=&quot;Started&quot;<br>
&gt;<br>
&gt; primitive myapp1 ocf:heartbeat:Redundancy \<br>
&gt; op monitor interval=&quot;60s&quot; role=&quot;Master&quot; timeout=&quot;30s&quot; on-fail=&quot;standby&quot; \<br>
&gt; op monitor interval=&quot;40s&quot; role=&quot;Slave&quot; timeout=&quot;40s&quot; on-fail=&quot;restart&quot;<br>
&gt;<br>
&gt; primitive myapp2 ocf:mcg:Redundancy_myapp2 \<br>
&gt; op monitor interval=&quot;60&quot; role=&quot;Master&quot; timeout=&quot;30&quot; on-fail=&quot;standby&quot; \<br>
&gt; op monitor interval=&quot;40&quot; role=&quot;Slave&quot; timeout=&quot;40&quot; on-fail=&quot;restart&quot;<br>
&gt;<br>
&gt; primitive myapp3 ocf:mcg:red_app3 \<br>
&gt; op monitor interval=&quot;60&quot; role=&quot;Master&quot; timeout=&quot;30&quot; on-fail=&quot;fence&quot; \<br>
&gt; op monitor interval=&quot;40&quot; role=&quot;Slave&quot; timeout=&quot;40&quot; on-fail=&quot;restart&quot;<br>
&gt;<br>
&gt; ms ms_myapp1 myapp1 \<br>
&gt; meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot;<br>
&gt; notify=&quot;true&quot;<br>
&gt;<br>
&gt; ms ms_myapp2 myapp2 \<br>
&gt; meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot;<br>
&gt; notify=&quot;true&quot;<br>
&gt;<br>
&gt; ms ms_myapp3 myapp3 \<br>
&gt; meta master-max=&quot;1&quot; master-max-node=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot;<br>
&gt; notify=&quot;true&quot;<br>
&gt;<br>
&gt; colocation myapp1_col inf: ClusterIP ms_myapp1:Master<br>
&gt;<br>
&gt; colocation myapp2_col inf: ClusterIP ms_myapp2:Master<br>
&gt;<br>
&gt; colocation myapp3_col inf: ClusterIP ms_myapp3:Master<br>
&gt;<br>
&gt; order myapp1_order inf: ms_myapp1:promote ClusterIP:start<br>
&gt;<br>
&gt; order myapp2_order inf: ms_myapp2:promote ms_myapp1:start<br>
&gt;<br>
&gt; order myapp3_order inf: ms_myapp3:promote ms_myapp2:start<br>
&gt;<br>
&gt; property $id=&quot;cib-bootstrap-options&quot; \<br>
&gt; dc-version=&quot;1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1&quot; \<br>
&gt; cluster-infrastructure=&quot;Heartbeat&quot; \<br>
&gt; stonith-enabled=&quot;true&quot; \<br>
&gt; no-quorum-policy=&quot;ignore&quot;<br>
&gt;<br>
&gt; rsc_defaults $id=&quot;rsc-options&quot; \<br>
&gt; resource-stickiness=&quot;100&quot; \<br>
&gt; migration-threshold=&quot;3&quot;<br></div></div>
&gt; *<div class="im"><br>
&gt; I start Heartbeat demon only one of the nodes e.g. mcg1. But none of the<br>
&gt; resources (myapp, myapp1 etc) gets started even on this node.<br></div>
&gt; Following is the output of &quot;*crm_mon -f *&quot; command:<br>
&gt;<br>
&gt; *Last updated: Mon Oct 17 10:19:22 2011<div class="im"><br>
&gt; Stack: Heartbeat<br>
&gt; Current DC: mcg1 (3d507250-780f-414a-b674-8c8d84e345cd)- partition with<br>
&gt; quorum<br>
&gt; Version: 1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1<br>
&gt; 2 Nodes configured, unknown expected votes<br>
&gt; 5 Resources configured.<br>
&gt; ============<br>
&gt; Node mcg2 (16738ea4-adae-483f-9d79-b0ecce8050f4): UNCLEAN (offline)<br>
<br></div>
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><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, Oct 17, 2011 at 4:04 PM, neha chatrath <span dir="ltr">&lt;<a href="mailto:nehachatrath@gmail.com" target="_blank">nehachatrath@gmail.com</a>&gt;</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=&quot;16738ea4-adae-483f-9d79-b0ecce8050f4&quot; mcg2 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">attributes standby=&quot;off&quot;</span><br style="color:rgb(51, 102, 255)">


<br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">node $id=&quot;3d507250-780f-414a-b674-8c8d84e345cd&quot; mcg1 \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">attributes standby=&quot;off&quot;</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=&quot;192.168.1.204&quot; cidr_netmask=&quot;255.255.255.0&quot; nic=&quot;eth0:1&quot; \</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=&quot;40s&quot; timeout=&quot;20s&quot; \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">meta target-role=&quot;Started&quot;</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=&quot;90&quot; \</span><br style="color:rgb(51, 102, 255)">


<span style="color:rgb(51, 102, 255)">meta target-role=&quot;Started&quot;</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=&quot;60s&quot; role=&quot;Master&quot; timeout=&quot;30s&quot; on-fail=&quot;standby&quot; \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">op monitor interval=&quot;40s&quot; role=&quot;Slave&quot; timeout=&quot;40s&quot; on-fail=&quot;restart&quot;</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=&quot;60&quot; role=&quot;Master&quot; timeout=&quot;30&quot; on-fail=&quot;standby&quot; \</span><br style="color:rgb(51, 102, 255)">


<span style="color:rgb(51, 102, 255)">op monitor interval=&quot;40&quot; role=&quot;Slave&quot; timeout=&quot;40&quot; on-fail=&quot;restart&quot;</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=&quot;60&quot; role=&quot;Master&quot; timeout=&quot;30&quot; on-fail=&quot;fence&quot; \</span><br style="color:rgb(51, 102, 255)">


<span style="color:rgb(51, 102, 255)">op monitor interval=&quot;40&quot; role=&quot;Slave&quot; timeout=&quot;40&quot; on-fail=&quot;restart&quot;</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=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot; notify=&quot;true&quot;</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=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot; notify=&quot;true&quot;</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=&quot;1&quot; master-max-node=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot; notify=&quot;true&quot;</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=&quot;cib-bootstrap-options&quot; \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">dc-version=&quot;1.0.11-db98485d06ed3fe0fe236509f023e1bd4a5566f1&quot; \</span><br style="color:rgb(51, 102, 255)">


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


<span style="color:rgb(51, 102, 255)">no-quorum-policy=&quot;ignore&quot;</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=&quot;rsc-options&quot; \</span><br style="color:rgb(51, 102, 255)">


<span style="color:rgb(51, 102, 255)">resource-stickiness=&quot;100&quot; \</span><br style="color:rgb(51, 102, 255)"><span style="color:rgb(51, 102, 255)">migration-threshold=&quot;3&quot;</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 &quot;<b style="color:rgb(51, 102, 255)">crm_mon -f </b>&quot; 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 &quot;stonith_enabled&quot; 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>
</div></div></blockquote></div><br>