<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Greetings,</div><div><br></div><div>I am getting closer to what I need.&nbsp;</div><div><br></div><div>I am having trouble figuring out a rule for p_VIPeth1_1 that will cause it's score to be -inf if p_R_NODE1 is not running.</div><div>Here is the rule that I am struggling with.&nbsp;</div><div><div><br></div><div>location p_VIPeth1_1_loc2 p_VIPeth1_1 \</div><div><span class="Apple-tab-span" style="white-space: pre;">        </span>rule $id="p_VIPeth1_1_loc2-rule" -inf: p_R_NODE1 eq Stopped</div></div><div><br></div><div><br></div><div>\/ The entire config so far is below \/</div><div><br></div><div>root@clust1:~# crm configure show</div><div>node $id="404ea40c-f92d-4649-869d-41beaf261d87" clust1 \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>attributes standby="off"</div><div>node $id="ae33be72-ccbb-4f54-859f-fd400efeb60b" clust2 \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>attributes standby="off"</div><div>primitive p_PINGDB ocf:pacemaker:ping \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>params host_list="192.168.254.42" name="p_PINGDB" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>op monitor interval="15s" timeout="5s"</div><div>primitive p_R_NODE1 lsb:rabbitmq-server \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>op monitor interval="15s" timeout="15s" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>meta target-role="Started" is-managed="true"</div><div>primitive p_R_NODE2 lsb:rabbitmq-server \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>op monitor interval="15s" timeout="15s" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>meta target-role="Started"</div><div>primitive p_VIPeth1_1 ocf:heartbeat:IPaddr \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>params ip="192.168.254.78" cidr_netmask="255.255.255.0" nic="eth1" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>op monitor interval="40s" timeout="20s" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>meta target-role="Started" is-managed="true"</div><div>clone p_PINGDB_clone p_PINGDB</div><div>location cli-standby-p_R_NODE1 p_R_NODE1 \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>rule $id="cli-standby-rule-p_R_NODE1" -inf: #uname eq clust2</div><div>location p_R_NODE1_loc p_R_NODE1 -inf: clust2</div><div>location p_R_NODE1_pref p_R_NODE1 inf: clust1</div><div>location p_R_NODE2_loc p_R_NODE2 -inf: clust1</div><div>location p_R_NODE2_pref p_R_NODE2 inf: clust2</div><div>location p_VIPeth1_1_loc p_VIPeth1_1 \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>rule $id="p_VIPeth1_1_loc-rule" -inf: p_PINGDB lte 0</div><div><b>location p_VIPeth1_1_loc2 p_VIPeth1_1 \</b></div><div><b><span class="Apple-tab-span" style="white-space:pre">        </span>rule $id="p_VIPeth1_1_loc2-rule" -inf: p_R_NODE1 eq Stopped</b></div><div>property $id="cib-bootstrap-options" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>cluster-infrastructure="Heartbeat" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>stonith-enabled="false" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>default-action-timeout="120" \</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>last-lrm-refresh="1395671783"</div><div>root@clust1:~#&nbsp;</div><div><br></div><div><br></div><div>Thanks,&nbsp;</div><div>Steve</div><div><br></div><div><br></div><br><div>From: andrew@beekhof.net<br>Date: Wed, 19 Mar 2014 09:37:43 +1100<br>To: pacemaker@oss.clusterlabs.org<br>Subject: Re: [Pacemaker] Don't want to stop lsb resource on migration<br><br><pre> <br>On 19 Mar 2014, at 6:56 am, Bingham &lt;knee-jerk-reaction@hotmail.com&gt; wrote:<br> <br>&gt; <br>&gt; My problem is that I need to have rabbitmq running on both node1 and node2.<br>&gt; I also need the IP to fail over if rabbitmq were to fail on the current node.<br>&gt; <br>&gt; The 2 rabbitmq services are communicating with each other. <br>&gt; Data is pushed to the clients. <br>&gt; <br>&gt; Even though the IP may currently live on node1, data may flow through node1 then through node2 (via rabbit) and out to client.<br>&gt; <br>&gt;                        Rnode1 -------&gt; client1<br>&gt;                      /     /|\<br>&gt; DB----&gt;VIP         |<br>&gt;                            \|/<br>&gt;                       Rnode2 --------&gt; client2<br>&gt; <br>&gt; <br>&gt; <br>&gt; Maybe I should not have these resources grouped together since that implies collocation infinity for IP and rabbitmq?<br> <br>Correct. It also sounds like rabbitmq should be a master/slave resource<br> <br>&gt; <br>&gt; <br>&gt; Steve<br>&gt; <br>&gt; <br>&gt; From: andrew@beekhof.net<br>&gt; Date: Tue, 18 Mar 2014 11:44:34 +1100<br>&gt; To: pacemaker@oss.clusterlabs.org<br>&gt; Subject: Re: [Pacemaker] Don't want to stop lsb resource on migration<br>&gt; <br>&gt;  <br>&gt; On 14 Mar 2014, at 1:00 am, Bingham &lt;knee-jerk-reaction@hotmail.com&gt; wrote:<br>&gt;  <br>&gt; &gt; Hello,<br>&gt; &gt; <br>&gt; &gt; My setup:<br>&gt; &gt;          I have a 2 node cluster using pacemaker and heartbeat. I have 2 resources, ocf::heartbeat:IPaddr and lsb:rabbitmq-server.       <br>&gt; &gt;          I have these 2 resources grouped together and they will fail over to the other node.<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; question:<br>&gt; &gt;          When rabbitmq is migrated to node1 from node2 I would like to 'not' have the the &lt;/etc/init.d/rabbitmq-server stop&gt; happen on the failed server (node1 in this example).<br>&gt;  <br>&gt; 'migrate' has special meaning here.<br>&gt; After a failure rabbitmq is moved (stopped on the old node and started on the new one), which is different from a migration.<br>&gt;  <br>&gt; Leaving rabbitmq in an unclean state on node1 would definitely not be a good idea.<br>&gt;  <br>&gt; &gt; <br>&gt; &gt;           Is it possible to do this in crm? <br>&gt; &gt;  <br>&gt; &gt;          I realize that I could hack the initscript's case statement for stop to just "exit 0", but I am hoping there is a way to do this in crm.<br>&gt; &gt; <br>&gt; &gt;   <br>&gt; &gt; Thanks for any help,<br>&gt; &gt; Steve<br>&gt; &gt;           <br>&gt; &gt; <br>&gt; &gt; _______________________________________________<br>&gt; &gt; Pacemaker mailing list: Pacemaker@oss.clusterlabs.org<br>&gt; &gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>&gt; &gt; <br>&gt; &gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>&gt; &gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>&gt; &gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>&gt;  <br>&gt; <br>&gt; _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a> Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a> Getting started:<a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a> Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>&gt; _______________________________________________<br>&gt; Pacemaker mailing list: Pacemaker@oss.clusterlabs.org<br>&gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>&gt; <br>&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>&gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br> <br></pre><br>_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org</div>                                               </div></body>
</html>