<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Arabic Transparent, Arial;font-size:13px"><span>Hi,</span><div class="qtdSeparateBR"><br><br></div><div style="display: block;" id="yui_3_16_0_ym19_1_1461558639865_7258" class="yahoo_quoted"><div id="yui_3_16_0_ym19_1_1461558639865_7257" style="font-family: Arabic Transparent, Arial; font-size: 13px;"><div id="yui_3_16_0_ym19_1_1461558639865_7256" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"><div id="yui_3_16_0_ym19_1_1461558639865_7369" class="y_msg_container"><div id="yiv0278030021"><div id="yui_3_16_0_ym19_1_1461558639865_7617"><div id="yui_3_16_0_ym19_1_1461558639865_7616" style="color:#000;background-color:#fff;font-family:Arabic Transparent, Arial;font-size:13px;"><div id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7125"><br clear="none"><span></span></div><div id="yui_3_16_0_ym19_1_1461558639865_7655" dir="ltr"><span id="yui_3_16_0_ym19_1_1461558639865_7654">Thanks for your offer. I checked this and this is a amazing solution.</span></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7119"><span id="yui_3_16_0_ym19_1_1461558639865_7656">So I defined two cluster :</span></div><div id="yui_3_16_0_ym19_1_1461558639865_7657" dir="ltr"><span><br clear="none"></span></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7117">testcluster1:</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7115">App1</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7299">App2</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7153">resource : IP float</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7285"><br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7235">testcluster2:</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7178">App3</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7179">App4</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7301"><br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7329">resource : tomcat</div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7303"><br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7479">I know that we need to grant a ticket and manage that with Booth. But I couldn't understand how should I define a ticket and relation of nodes and clusters with the ticket. I read the mentioned doc, but I missed up. Can you give me one example?</div><div id="yui_3_16_0_ym19_1_1461558639865_7658" dir="ltr"><br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7540"><br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7518">Thanks so.<br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7481"><br clear="none"></div><div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7489"><br clear="none"><span></span></div><div class="yiv0278030021qtdSeparateBR" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6934"><br clear="none"><br clear="none"></div><div class="yiv0278030021yqt1707914567" id="yiv0278030021yqt33850"><div class="yiv0278030021yahoo_quoted" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6966" style="display:block;"> <div id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6965" style="font-family:Arabic Transparent, Arial;font-size:13px;"> <div id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6964" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"> <div dir="ltr" id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6963"> <font id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6968" face="Arial" size="2"> </font><hr id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_7041" size="1"> <b id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6971"><span id="yiv0278030021yui_3_16_0_ym19_1_1461464933167_6970" style="font-weight:bold;">From:</span></b> Ken Gaillot <kgaillot@redhat.com><br clear="none"> <br clear="none"> </div> <div class="yiv0278030021y_msg_container"><br clear="none"><div dir="ltr">On 04/20/2016 12:44 AM, H Yavari wrote:<br clear="none">> You got my situation right. But I couldn't find any method to do this?<br clear="none">> <br clear="none">> I should create one cluster with 4 node or 2 cluster with 2 node ? How I<br clear="none">> restrict the cluster nodes to each other!!?<br clear="none"><br clear="none">Your last questions made me think of multi-site clustering using booth.<br clear="none">I think this might be the best solution for you.<br clear="none"><br clear="none">You can configure two independent pacemaker clusters of 2 nodes each,<br clear="none">then use booth to ensure that one cluster has the resources at any time.<br clear="none">See:<br clear="none"><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617279413776">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617279413776</a><br clear="none"><br clear="none">This is usually done with clusters at physically separate locations, but<br clear="none">there's no problem with using it with two clusters in one location.<br clear="none"><br clear="none">Alternatively, going along more traditional lines such as what Klaus and<br clear="none">I have mentioned, you could use rules and node attributes to keep the<br clear="none">resources where desired. You could write a custom resource agent that<br clear="none">would set a custom node attribute for the matching node (the start<br clear="none">action should set the attribute to 1, and the stop action should set the<br clear="none">attribute to 0; if the resource was on App 1, you'd set the attribute<br clear="none">for App 3, and if the resource was on App 4, you'd set the attribute for<br clear="none">App 4). Colocate that resource with your floating IP, and use a rule to<br clear="none">locate service X where the custom node attribute is 1. See:<br clear="none"><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#ap-ocf">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#ap-ocf</a><br clear="none"><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617279376656">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617279376656</a><br clear="none"><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617356537136">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617356537136</a><br clear="none"><br clear="none">> <br clear="none">> ------------------------------------------------------------------------<br clear="none">> *From:* Klaus Wenninger <<a rel="nofollow" shape="rect" ymailto="mailto:kwenning@redhat.com" target="_blank" href="mailto:kwenning@redhat.com">kwenning@redhat.com</a>><br clear="none">> *To:* <a rel="nofollow" shape="rect" ymailto="mailto:users@clusterlabs.org" target="_blank" href="mailto:users@clusterlabs.org">users@clusterlabs.org</a><br clear="none">> *Sent:* Wednesday, 20 April 2016, 9:56:05<br clear="none">> *Subject:* Re: [ClusterLabs] Moving Related Servers<br clear="none">> <br clear="none">> On 04/19/2016 04:32 PM, Ken Gaillot wrote:<br clear="none">>> On 04/18/2016 10:05 PM, H Yavari wrote:<br clear="none">>>> Hi,<br clear="none">>>><br clear="none">>>> This is servers maps:<br clear="none">>>><br clear="none">>>> App 3---------> App 1 (Active)<br clear="none">>>><br clear="none">>>> App 4 ---------> App 2 (Standby)<br clear="none">>>><br clear="none">>>><br clear="none">>>> Now App1 and App2 are in a cluster with IP failover.<br clear="none">>>><br clear="none">>>> I need when IP failover will run and App2 will be Active node, service<br clear="none">>>> "X" on server App3 will be stop and App 4 will be Active node.<br clear="none">>>> In the other words, App1 works only with App3 and App 2 works with App 4.<br clear="none">>>><br clear="none">>>> I have a web application on App1 and some services on App 3 (this is<br clear="none">>>> same for App2 and App 4)<br clear="none">>> This is a difficult situation to model. In particular, you could only<br clear="none">>> have a dependency one way -- so if we could get App 3 to fail over if<br clear="none">>> App 1 fails, we couldn't model the other direction (App 1 failing over<br clear="none">>> if App 3 fails). If each is dependent on the other, there's no way to<br clear="none">>> start one first.<br clear="none">>><br clear="none">>> Is there a technical reason App 3 can work only with App 1?<br clear="none">>><br clear="none">>> Is it possible for service "X" to stay running on both App 3 and App 4<br clear="none">>> all the time? If so, this becomes easier.<br clear="none">> Just another try to understand what you are aiming for:<br clear="none">> <br clear="none">> You have a 2-node-cluster at the moment consisting of the nodes<br clear="none">> App1 & App2.<br clear="none">> You configured something like a master/slave-group to realize<br clear="none">> an active/standby scenario.<br clear="none">> <br clear="none">> To get the servers App3 & App4 into the game we would make<br clear="none">> them additional pacemaker-nodes (App3 & App4).<br clear="none">> You now have a service X that could be running either on App3 or<br clear="none">> App4 (which is easy by e.g. making it dependent on a node attribute)<br clear="none">> and it should be running on App3 when the service-group is active<br clear="none">> (master in pacemaker terms) on App1 and on App4 when the<br clear="none">> service-group is active on App2.<br clear="none">> <br clear="none">> The standard thing would be to collocate a service with the master-role<br clear="none">> (see all the DRBD examples for instance).<br clear="none">> We would now need a locate-x when master is located-y rule instead<br clear="none">> of collocation.<br clear="none">> I don't know any way to directly specify this.<br clear="none">> One - ugly though - way around I could imagine would be:<br clear="none">> <br clear="none">> - locate service X1 on App3<br clear="none">> - locate service X2 on App4<br clear="none">> - dummy service Y1 is located App1 and collocated with master-role<br clear="none">> - dummy service Y2 is located App2 and collocated with master-role<br clear="none">> - service X1 depends on Y1<br clear="none">> - service X2 depends on Y2<br clear="none">> <br clear="none">> If that somehow reflects your situation the key question now would<br clear="none">> probably be if pengine would make the group on App2 master<br clear="none">> if service X1 fails on App3. I would guess yes but I'm not sure.<br clear="none">> <br clear="none">> Regards,<br clear="none">> Klaus<br clear="none">> <br clear="none">>>> Sorry for heavy description.<br clear="none">>>><br clear="none">>>><br clear="none">>>> ------------------------------------------------------------------------<br clear="none">>>> *From:* Ken Gaillot <<a rel="nofollow" shape="rect" ymailto="mailto:kgaillot@redhat.com" target="_blank" href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a> <mailto:<a rel="nofollow" shape="rect" ymailto="mailto:kgaillot@redhat.com" target="_blank" href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>>><br clear="none">>>> *To:* <a rel="nofollow" shape="rect" ymailto="mailto:users@clusterlabs.org" target="_blank" href="mailto:users@clusterlabs.org">users@clusterlabs.org</a> <mailto:<a rel="nofollow" shape="rect" ymailto="mailto:users@clusterlabs.org" target="_blank" href="mailto:users@clusterlabs.org">users@clusterlabs.org</a>><div class="yiv0278030021yqt3300985032" id="yiv0278030021yqtfd67846"><br clear="none">>>> **<br clear="none">>>> On 04/18/2016 02:34 AM, H Yavari wrote:<br clear="none">>>><br clear="none">>>>> Hi,<br clear="none">>>>><br clear="none">>>>> I have 4 CentOS servers (App1,App2.App3 and App4). I created a cluster<br clear="none">>>>> for App1 and App2 with a IP float and it works well.<br clear="none">>>>> In our infrastructure App1 works only with App3 and App2 only works with<br clear="none">>>>> App4. I mean we have 2 server sets (App1 and App3) , (App2 and App4).<br clear="none">>>>> So I want when server app1 is down and app2 will Online node, App3 will<br clear="none">>>>> offline too and App4 will Online and vice versa, I mean when App3 is<br clear="none">>>>> down and App4 will Online, App1 will offline too.<br clear="none">>>>><br clear="none">>>>><br clear="none">>>>> How can I do with pacemaker ? we have our self service on servers so how<br clear="none">>>>> can I user Pacemaker for monitoring these services?<br clear="none">>>>><br clear="none">>>>> Thanks for reply.<br clear="none">>>>><br clear="none">>>>> Regards.<br clear="none">>>>> H.Yavari<br clear="none">>>><br clear="none">>>> I'm not sure I understand your requirements.<br clear="none">>>><br clear="none">>>> There's no way to tell one node to leave the cluster when another node<br clear="none">>>> is down, and it would be a bad idea if you could: the nodes could never<br clear="none">>>> start up, because each would wait to see the other before starting; and<br clear="none">>>> in your cluster, two nodes shutting down would make the cluster lose<br clear="none">>>> quorum, so the other nodes would refuse to run any resources.<br clear="none">>>><br clear="none">>>> However, it is usually possible to use constraints to enforce any<br clear="none">>>> desired behavior. So even those the node might not leave the cluster,<br clear="none">>>> you could make the cluster not place any resources on that node.<br clear="none">>>><br clear="none">>>> Can you give more information about your resources and what nodes they<br clear="none">>>> are allowed to run on? What makes App1 and App3 dependent on each other?<br clear="none"><br clear="none">_______________________________________________<br clear="none">Users mailing list: <a rel="nofollow" shape="rect" ymailto="mailto:Users@clusterlabs.org" target="_blank" href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://clusterlabs.org/mailman/listinfo/users">http://clusterlabs.org/mailman/listinfo/users</a><br clear="none"><br clear="none">Project Home: <a rel="nofollow" shape="rect" target="_blank" href="http://www.clusterlabs.org/">http://www.clusterlabs.org</a><br clear="none">Getting started: <a rel="nofollow" shape="rect" target="_blank" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br clear="none">Bugs: <a rel="nofollow" shape="rect" target="_blank" href="http://bugs.clusterlabs.org/">http://bugs.clusterlabs.org</a><br clear="none"></div></div><br clear="none"><br clear="none"></div> </div> </div> </div></div></div></div></div><br><br></div> </div> </div> </div></div></body></html>