Thank you. I used this and it works. Regards. From: Ken Gaillot <kgail...@redhat.com> To: users@clusterlabs.org Sent: Thursday, 19 May 2016, 19:34:08 Subject: Re: [ClusterLabs] Node attributes On 05/18/2016 10:49 PM, H Yavari wrote: > Hi, > > How can I define a constraint for two resource based on one nodes > attribute? > > For example resource X and Y are co-located based on node attribute Z. > > > > Regards, > H.Yavari
Hi, See http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617356537136 High-level tools such as pcs and crm provide a simpler interface, but the concepts will be the same. This works for location constraints, not colocation, but you can easily accomplish what you want. If your goal is that X and Y each can only run on a node with attribute Z, then set up a location constraint for each one using the appropriate rule. If you goal is that X and Y must be colocated together, on a node with attribute Z, then set up a regular colocation constraint between them, and a location constraint for one of them with the appropriate rule; or, put them in a group, and set up a location constraint for the group with the appropriate rule. _______________________________________________ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
_______________________________________________ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org