<div dir="ltr"><br><div class="gmail_extra"><span style="color:rgb(80,0,80)">Hi Vladislav,</span></div><div class="gmail_extra"><font color="#500050"><br></font></div><div class="gmail_extra"><font color="#500050">Thanks for the response.</font></div>
<div class="gmail_extra" style><font color="#500050">I will follow your suggestions.</font></div><div class="gmail_extra" style><font color="#500050"><br></font></div><div class="gmail_extra" style><font color="#500050">I have configured my required configuration in a different manner:</font></div>
<div class="gmail_extra" style><font color="#500050">(1) </font><span style="color:rgb(80,0,80)"> crm configure : </span><font color="#500050">all the 3 primitives</font></div><div class="gmail_extra" style><font color="#500050">(2)  </font><span style="color:rgb(80,0,80)">crm configure colocation :</span><span style="color:rgb(80,0,80)"> for </span><span style="color:rgb(80,0,80)">all the 3 primitives</span></div>
<div class="gmail_extra" style><span style="color:rgb(80,0,80)">(3)  </span><span style="color:rgb(80,0,80)">crm configure order : for the primitives</span></div><div class="gmail_extra" style><font color="#500050"><br></font></div>
<div class="gmail_extra" style><font color="#500050">(4) Now I did clone for the </font><span style="color:rgb(80,0,80)">3 primitives </span></div><div class="gmail_extra" style><span style="color:rgb(80,0,80)"><br></span></div>
<div class="gmail_extra" style><span style="color:rgb(80,0,80)">But I couldn't understand why pacemaker is giving errors with this type of configuration.</span></div><div class="gmail_extra" style><span style="color:rgb(80,0,80)"><br>
</span></div><div class="gmail_extra" style><span style="color:rgb(80,0,80)">Thanks</span></div><div class="gmail_extra" style><span style="color:rgb(80,0,80)">Eswar</span></div><div class="gmail_extra"><font color="#500050"><br>
</font><br><div class="gmail_quote">On Sat, Dec 7, 2013 at 2:47 PM, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">06.12.2013 14:07, ESWAR RAO wrote:<br>
> Hi Vladislav,<br>
><br>
> I used the below advisory colocation but its not working.<br>
<br>
</div>Do be frank, I'm not sure if it even possible to achieve such "exotic"<br>
behavior with just pacemaker in a non-fragile way, that was just a<br>
suggestion.<br>
But you may also play with CIB editing from within resource agent code,<br>
f.e. remove some node attributes your resources depend on (with location<br>
constraints) when threshold is reached, or something similar.<br>
<div><div class="h5"><br>
<br>
> On 3 node setup:<br>
><br>
> I have configured all 3 resources in clone mode to start only on node1<br>
> and node2 with a fail-count of only 1.<br>
> +++++++++++++++++++++++++++++++++++++++<br>
> + crm configure primitive res_dummy_1 lsb::dummy_1 meta<br>
> allow-migrate=false migration-threshold=1 op monitor interval=5s<br>
> + crm configure clone dummy_1_clone res_dummy_1 meta clone-max=2<br>
> globally-unique=false<br>
> + crm configure location dummy_1_clone_prefer_node dummy_1_clone -inf:<br>
> 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<br>
> dummy_2_clone dummy_3_clone<br>
> +++++++++++++++++++++++++++++++++++++++<br>
><br>
> After I killed dummy_1 on node1 , i expected the pacemaker to kill<br>
> dummy_2 and dummy_3 on node1 and not to disturb the apps on node2.<br>
><br>
> But with above colocation rule, it stopped the apps on node1 but it<br>
> restarted dummy_2 and dummy_3 on node2.<br>
><br>
> 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>
> Thanks<br>
> Eswar<br>
><br>
><br>
><br>
> On Fri, Dec 6, 2013 at 12:20 PM, ESWAR RAO <<a href="mailto:eswar7028@gmail.com">eswar7028@gmail.com</a><br>
</div></div><div class="im">> <mailto:<a href="mailto:eswar7028@gmail.com">eswar7028@gmail.com</a>>> wrote:<br>
><br>
><br>
>     Thanks Vladislav.<br>
>     I will work on that.<br>
><br>
>     Thanks<br>
>     Eswar<br>
><br>
>     On Fri, Dec 6, 2013 at 11:05 AM, Vladislav Bogdanov<br>
</div><div><div class="h5">>     <<a href="mailto:bubble@hoster-ok.com">bubble@hoster-ok.com</a> <mailto:<a href="mailto:bubble@hoster-ok.com">bubble@hoster-ok.com</a>>> wrote:<br>
><br>
>         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<br>
>         HB+pacemaker.<br>
>         > I have 3 apps dummy1, dummy2 , dummy3 which needs to be run on<br>
>         only 2<br>
>         > nodes among the 3 nodes.<br>
>         ><br>
>         > By using the below configuration, I was able to run 3<br>
>         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>
>         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>
><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<br>
>         dummy1 and<br>
>         > dummy3 should start only after dummy2.<br>
>         ><br>
>         > For now I am keeping a sleep in the script and starting the<br>
>         resources by<br>
>         > using crm.<br>
>         ><br>
>         > Is there any clean way to have the dependency on the resources<br>
>         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>
>         The same is here.<br>
><br>
>         > # crm configure order dum2-BEFORE-dum3 0: res_dummy2 res_dummy3<br>
><br>
>         So, your example should look like:<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 clone app_clone res_dummy1 meta clone-max="2"<br>
>         globally-unique="false"<br>
>         # crm configure location app_prefer_node app_clone -inf: node3<br>
>         # crm configure order dum1-BEFORE-dum2 0: app_clone res_dummy2<br>
>         # 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<br>
>         restarts<br>
>         > others will not be affected.<br>
><br>
>         Yep, advisory ordering is fine for that.<br>
><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<br>
>         node??<br>
><br>
>         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">Pacemaker@oss.clusterlabs.org</a><br>
</div></div>>         <mailto:<a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>><br>
<div class="im">>         > <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:<br>
>         <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">Pacemaker@oss.clusterlabs.org</a><br>
</div>>         <mailto:<a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>><br>
<div class=""><div class="h5">>         <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:<br>
>         <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>
><br>
> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">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">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>
</div></div></blockquote></div><br></div></div>