<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Arabic Transparent, Arial;font-size:13px"><div>Thank you. I used this and it works.</div><div><br></div><div id="yui_3_16_0_ym19_1_1463797257357_3996" class="qtdSeparateBR">Regards.<br><br></div><div style="display: block;" id="yui_3_16_0_ym19_1_1463797257357_3991" class="yahoo_quoted"> <div id="yui_3_16_0_ym19_1_1463797257357_3990" style="font-family: Arabic Transparent, Arial; font-size: 13px;"> <div id="yui_3_16_0_ym19_1_1463797257357_3989" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div id="yui_3_16_0_ym19_1_1463797257357_3994" dir="ltr"> <font id="yui_3_16_0_ym19_1_1463797257357_3993" face="Arial" size="2"> <hr id="yui_3_16_0_ym19_1_1463797257357_4011" size="1"> <b><span style="font-weight:bold;">From:</span></b> Ken Gaillot <kgaillot@redhat.com><br> <b><span style="font-weight: bold;">To:</span></b> users@clusterlabs.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 19 May 2016, 19:34:08<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [ClusterLabs] Node attributes<br> </font> </div> <div id="yui_3_16_0_ym19_1_1463797257357_3988" class="y_msg_container"><br><div id="yui_3_16_0_ym19_1_1463797257357_3987" dir="ltr">On 05/18/2016 10:49 PM, H Yavari wrote:<br clear="none">> Hi,<br clear="none">> <br clear="none">> How can I define a constraint for two resource based on one nodes<br clear="none">> attribute?<br clear="none">> <br clear="none">> For example resource X and Y are co-located based on node attribute Z.<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> Regards,<br clear="none">> H.Yavari<div class="yqt3351409458" id="yqtfd01178"><br clear="none"><br clear="none">Hi,</div><br clear="none"><br clear="none">See<br clear="none"><a shape="rect" href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617356537136" target="_blank">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617356537136</a><br clear="none"><br clear="none">High-level tools such as pcs and crm provide a simpler interface, but<br clear="none">the concepts will be the same.<br clear="none"><br clear="none">This works for location constraints, not colocation, but you can easily<br clear="none">accomplish what you want. If your goal is that X and Y each can only run<br clear="none">on a node with attribute Z, then set up a location constraint for each<br clear="none">one using the appropriate rule. If you goal is that X and Y must be<br clear="none">colocated together, on a node with attribute Z, then set up a regular<br clear="none">colocation constraint between them, and a location constraint for one of<br clear="none">them with the appropriate rule; or, put them in a group, and set up a<br clear="none">location constraint for the group with the appropriate rule.<br clear="none"><br clear="none">_______________________________________________<br clear="none">Users mailing list: <a shape="rect" ymailto="mailto:Users@clusterlabs.org" href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br clear="none"><a shape="rect" href="http://clusterlabs.org/mailman/listinfo/users" target="_blank">http://clusterlabs.org/mailman/listinfo/users</a><br clear="none"><br clear="none">Project Home: <a shape="rect" href="http://www.clusterlabs.org/" target="_blank">http://www.clusterlabs.org</a><br clear="none">Getting started: <a shape="rect" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br clear="none">Bugs: <a shape="rect" href="http://bugs.clusterlabs.org/" target="_blank">http://bugs.clusterlabs.org</a><div class="yqt3351409458" id="yqtfd94933"><br clear="none"></div></div><br><br></div> </div> </div> </div></div></body></html>