<div dir="ltr"><div><div><div>Hi Vladislav,<br><br>I used the below advisory colocation but its not working.<br>On 3 node setup:<br><br></div><div>I have configured all 3 resources in clone mode to start only on node1 and node2 with a fail-count of only 1.<br>
</div><div>+++++++++++++++++++++++++++++++++++++++<br>+ crm configure primitive res_dummy_1 lsb::dummy_1 meta allow-migrate=false migration-threshold=1 op monitor interval=5s<br>+ crm configure clone dummy_1_clone res_dummy_1 meta clone-max=2 globally-unique=false<br>
+ crm configure location dummy_1_clone_prefer_node dummy_1_clone -inf: node-3<br>+++++++++++++++++++++++++++++++++++++++<br>advisory ordering:<br>+ crm configure order 1-BEFORE-2 0: dummy_1_clone dummy_2_clone<br>+ crm configure order 2-BEFORE-3 0: dummy_2_clone dummy_3_clone<br>
<br>+++++++++++++++++++++++++++++++++++++++<br>advisory colocation:<br>#  crm configure colocation node-with-apps inf: dummy_1_clone dummy_2_clone dummy_3_clone<br>+++++++++++++++++++++++++++++++++++++++<br></div><br></div>
After I killed dummy_1 on node1 , i expected the pacemaker to kill dummy_2 and dummy_3 on node1 and not to disturb the apps on node2.<br><br></div>But with above colocation rule, it stopped the apps on node1 but it restarted dummy_2 and dummy_3 on node2.<br>
<br><div>With a score of 0: it didn't stop  dummy_2 and dummy_3 on node1.<br>With a score of 500: it stopped only dummy_2 and restarted dummy_2 on node2.<br><br><br></div><div>Thanks<br></div><div>Eswar<br></div><div>
<div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 6, 2013 at 12:20 PM, ESWAR RAO <span dir="ltr"><<a href="mailto:eswar7028@gmail.com" target="_blank">eswar7028@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra">Thanks Vladislav.<br></div><div class="gmail_extra">I will work on that.<br>
<br></div><div class="gmail_extra">Thanks<span class=""><font color="#888888"><br></font></span></div><span class=""><font color="#888888"><div class="gmail_extra">Eswar<br></div></font></span><div><div class="h5"><div class="gmail_extra">

<br><div class="gmail_quote">On Fri, Dec 6, 2013 at 11:05 AM, Vladislav Bogdanov <span dir="ltr"><<a href="mailto:bubble@hoster-ok.com" target="_blank">bubble@hoster-ok.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div>06.12.2013 07:58, ESWAR RAO wrote:<br>
> Hi All,<br>
><br>
> Can someone help me with below configuration??<br>
><br>
> I have a 3 node HB setup (node1, node2, node3) which runs HB+pacemaker.<br>
> I have 3 apps dummy1, dummy2 , dummy3 which needs to be run on only 2<br>
> nodes among the 3 nodes.<br>
><br>
> By using the below configuration, I was able to run 3 resources on 2 nodes.<br>
><br>
> # crm configure primitive res_dummy1 lsb::dummy1 meta<br>
> allow-migrate="false" migration-threshold=3 failure-timeout="30s"<br>
> op monitor interval="5s"<br>
> # crm configure location app_prefer_node res_dummy1 -inf: node3<br>
<br>
</div>First that comes to mind is that you should put above line below the<br>
next one and refer app_clone instead of res_dummy1.<br>
<div><br>
> # crm configure clone app_clone res_dummy1 meta clone-max="2"<br>
> globally-unique="false"<br>
><br>
><br>
> I have a dependency order like dummy2 should start after dummy1 and<br>
> dummy3 should start only after dummy2.<br>
><br>
> For now I am keeping a sleep in the script and starting the resources by<br>
> using crm.<br>
><br>
> Is there any clean way to have the dependency on the resources so that<br>
> ordering is maintained while clone is run on bot the nodes??<br>
><br>
> I have tried with below config but couldn't succeed.<br>
> # crm configure order dum1-BEFORE-dum2 0: res_dummy1 res_dummy2<br>
<br>
</div>The same is here.<br>
<div><br>
> # crm configure order dum2-BEFORE-dum3 0: res_dummy2 res_dummy3<br>
<br>
</div>So, your example should look like:<br>
<div># crm configure primitive res_dummy1 lsb::dummy1 meta<br>
allow-migrate="false" migration-threshold=3 failure-timeout="30s"<br>
op monitor interval="5s"<br>
</div><div># crm configure clone app_clone res_dummy1 meta clone-max="2"<br>
globally-unique="false"<br>
</div># crm configure location app_prefer_node app_clone -inf: node3<br>
# crm configure order dum1-BEFORE-dum2 0: app_clone res_dummy2<br>
<div># crm configure order dum2-BEFORE-dum3 0: res_dummy2 res_dummy3<br>
<br>
> Instead of group i used order , so that even if 1 app gets restarts<br>
> others will not be affected.<br>
<br>
</div>Yep, advisory ordering is fine for that.<br>
<div><br>
><br>
> Also is there any way so that if 1 app fails more than<br>
> migration-threshold times, we can stop all 3 resources on that node??<br>
<br>
</div>Maybe advisory colocations can do something similar (I'm not sure)?<br>
<a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_advisory_placement.html" target="_blank">http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_advisory_placement.html</a><br>


<br>
You should find correct value for its score (positive or negative)<br>
though. crm_simulate is your friend for that.<br>
<br>
><br>
> Thanks<br>
> Eswar<br>
><br>
><br>
> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
> <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
><br>
> Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
> 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>
> Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
><br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
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>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div></div></div>