<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div dir="auto">
<div dir="auto">Hi</div><div dir="auto">You probably want to look at booth and tickets for a geo-clustering solution.</div><div dir="auto"><br></div><div dir='auto'><br></div>
<div id="aqm-original" style="color: black;">
<div dir="auto">On August 3, 2021 11:40:54 AM Antony Stone <Antony.Stone@ha.open.source.it> wrote:</div>
<div><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="auto">On Tuesday 11 May 2021 at 12:56:01, Strahil Nikolov wrote:</div>
<div dir="auto"><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">Here is the example I had promised:</div>
<div dir="auto"><br></div>
<div dir="auto">pcs node attribute server1 city=LA</div>
<div dir="auto">pcs node attribute server2 city=NY</div>
<div dir="auto"><br></div>
<div dir="auto"># Don't run on any node that is not in LA</div>
<div dir="auto">pcs constraint location DummyRes1 rule score=-INFINITY city ne LA</div>
<div dir="auto"><br></div>
<div dir="auto">#Don't run on any node that is not in NY</div>
<div dir="auto">pcs constraint location DummyRes2 rule score=-INFINITY city ne NY</div>
<div dir="auto"><br></div>
<div dir="auto">The idea is that if you add a node and you forget to specify the attribute</div>
<div dir="auto">with the name 'city' , DummyRes1 & DummyRes2 won't be started on it.</div>
<div dir="auto"><br></div>
<div dir="auto">For resources that do not have a constraint based on the city -> they will</div>
<div dir="auto">run everywhere unless you specify a colocation constraint between the</div>
<div dir="auto">resources.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">Excellent - thanks.  I happen to use crmsh rather than pcs, but I've adapted </div>
<div dir="auto">the above and got it working.</div>
<div dir="auto"><br></div>
<div dir="auto">Unfortunately, there is a problem.</div>
<div dir="auto"><br></div>
<div dir="auto">My current setup is:</div>
<div dir="auto"><br></div>
<div dir="auto">One 3-machine cluster in city A running a bunch of resources between them, the </div>
<div dir="auto">most important of which for this discussion is Asterisk telephony.</div>
<div dir="auto"><br></div>
<div dir="auto">One 3-machine cluster in city B doing exactly the same thing.</div>
<div dir="auto"><br></div>
<div dir="auto">The two clusters have no knowledge of each other.</div>
<div dir="auto"><br></div>
<div dir="auto">I have high-availability routing between my clusters and my upstream telephony </div>
<div dir="auto">provider, such that a call can be handled by Cluster A or Cluster B, and if </div>
<div dir="auto">one is unavailable, the call gets routed to the other.</div>
<div dir="auto"><br></div>
<div dir="auto">Thus, a total failure of Cluster A means I still get phone calls, via Cluster </div>
<div dir="auto">B.</div>
<div dir="auto"><br></div>
<div dir="auto"><br></div>
<div dir="auto">To implement the above "one resource which can run anywhere, but only a single </div>
<div dir="auto">instance", I joined together clusters A and B, and placed the corresponding </div>
<div dir="auto">location constraints on the resources I want only at A and the ones I want </div>
<div dir="auto">only at B.  I then added the resource with no location constraint, and it runs </div>
<div dir="auto">anywhere, just once.</div>
<div dir="auto"><br></div>
<div dir="auto">So far, so good.</div>
<div dir="auto"><br></div>
<div dir="auto"><br></div>
<div dir="auto">The problem is:</div>
<div dir="auto"><br></div>
<div dir="auto">With the two independent clusters, if two machines in city A fail, then </div>
<div dir="auto">Cluster A fails completely (no quorum), and Cluster B continues working.  That </div>
<div dir="auto">means I still get phone calls.</div>
<div dir="auto"><br></div>
<div dir="auto">With the new setup, if two machines in city A fail, then _both_ clusters stop </div>
<div dir="auto">working and I have no functional resources anywhere.</div>
<div dir="auto"><br></div>
<div dir="auto"><br></div>
<div dir="auto">So, my question now is:</div>
<div dir="auto"><br></div>
<div dir="auto">How can I have a 3-machine Cluster A running local resources, and a 3-machine </div>
<div dir="auto">Cluster B running local resources, plus one resource running on either Cluster </div>
<div dir="auto">A or Cluster B, but without a failure of one cluster causing _everything_ to </div>
<div dir="auto">stop?</div>
<div dir="auto"><br></div>
<div dir="auto"><br></div>
<div dir="auto">Thanks,</div>
<div dir="auto"><br></div>
<div dir="auto"><br></div>
<div dir="auto">Antony.</div>
<div dir="auto"><br></div>
<div dir="auto">-- </div>
<div dir="auto">One tequila, two tequila, three tequila, floor.</div>
<div dir="auto"><br></div>
<div dir="auto">                                                   Please reply to the list;</div>
<div dir="auto">                                                         please *don't* CC me.</div>
<div dir="auto">_______________________________________________</div>
<div dir="auto">Manage your subscription:</div>
<div dir="auto">https://lists.clusterlabs.org/mailman/listinfo/users</div>
<div dir="auto"><br></div>
<div dir="auto">ClusterLabs home: https://www.clusterlabs.org/</div>
</blockquote>
</div><div dir="auto"><br></div>
</div></body>
</html>