[Pacemaker] Reg. cone and order attributes

ESWAR RAO eswar7028 at gmail.com
Fri Dec 6 06:50:28 UTC 2013


Thanks Vladislav.
I will work on that.

Thanks
Eswar

On Fri, Dec 6, 2013 at 11:05 AM, Vladislav Bogdanov <bubble at hoster-ok.com>wrote:

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


More information about the Pacemaker mailing list