<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 3, 2021 at 10:41 AM Antony Stone <<a href="mailto:Antony.Stone@ha.open.source.it">Antony.Stone@ha.open.source.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tuesday 11 May 2021 at 12:56:01, Strahil Nikolov wrote:<br>
<br>
> Here is the example I had promised:<br>
><br>
> pcs node attribute server1 city=LA<br>
> pcs node attribute server2 city=NY<br>
><br>
> # Don't run on any node that is not in LA<br>
> pcs constraint location DummyRes1 rule score=-INFINITY city ne LA<br>
> <br>
> #Don't run on any node that is not in NY<br>
> pcs constraint location DummyRes2 rule score=-INFINITY city ne NY<br>
><br>
> The idea is that if you add a node and you forget to specify the attribute<br>
> with the name 'city' , DummyRes1 & DummyRes2 won't be started on it.<br>
> <br>
> For resources that do not have a constraint based on the city -> they will<br>
> run everywhere unless you specify a colocation constraint between the<br>
> resources.<br>
<br>
Excellent - thanks.  I happen to use crmsh rather than pcs, but I've adapted <br>
the above and got it working.<br>
<br>
Unfortunately, there is a problem.<br>
<br>
My current setup is:<br>
<br>
One 3-machine cluster in city A running a bunch of resources between them, the <br>
most important of which for this discussion is Asterisk telephony.<br>
<br>
One 3-machine cluster in city B doing exactly the same thing.<br>
<br>
The two clusters have no knowledge of each other.<br>
<br>
I have high-availability routing between my clusters and my upstream telephony <br>
provider, such that a call can be handled by Cluster A or Cluster B, and if <br>
one is unavailable, the call gets routed to the other.<br>
<br>
Thus, a total failure of Cluster A means I still get phone calls, via Cluster <br>
B.<br>
<br>
<br>
To implement the above "one resource which can run anywhere, but only a single <br>
instance", I joined together clusters A and B, and placed the corresponding <br>
location constraints on the resources I want only at A and the ones I want <br>
only at B.  I then added the resource with no location constraint, and it runs <br>
anywhere, just once.<br>
<br>
So far, so good.<br>
<br>
<br>
The problem is:<br>
<br>
With the two independent clusters, if two machines in city A fail, then <br>
Cluster A fails completely (no quorum), and Cluster B continues working.  That <br>
means I still get phone calls.<br>
<br>
With the new setup, if two machines in city A fail, then _both_ clusters stop <br>
working and I have no functional resources anywhere.<br></blockquote><div>Why that? If you are talking about quorum a 4-node partition in a 6-node</div><div>cluster should be quorate.</div><div>Not saying the config is ideal though. Even node number ...</div><div>And when city A doesn't see city B you end up with 2 3-node partitions</div><div>that aren't quorate without additional measures.</div><div>Did you consider booth? Might really be a better match for your problem.</div><div><br></div><div>Klaus </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
So, my question now is:<br>
<br>
How can I have a 3-machine Cluster A running local resources, and a 3-machine <br>
Cluster B running local resources, plus one resource running on either Cluster <br>
A or Cluster B, but without a failure of one cluster causing _everything_ to <br>
stop?<br>
<br>
<br>
Thanks,<br>
<br>
<br>
Antony.<br>
<br>
-- <br>
One tequila, two tequila, three tequila, floor.<br>
<br>
                                                   Please reply to the list;<br>
                                                         please *don't* CC me.<br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
<br>
</blockquote></div></div>