[ClusterLabs] Sub‑clusters / super‑clusters - working :)

Antony Stone Antony.Stone at ha.open.source.it
Fri Aug 6 09:33:04 EDT 2021

On Friday 06 August 2021 at 15:12:57, Andrei Borzenkov wrote:

> On Fri, Aug 6, 2021 at 3:42 PM Antony Stone wrote:
> > On Friday 06 August 2021 at 14:14:09, Andrei Borzenkov wrote:
> > > 
> > > If connectivity between (any two) sites is lost you may end up with
> > > one of A or B going out of quorum.
> > 
> > Agreed.
> > 
> > > While this will stop active resources and restart them on another site,
> > 
> > No.  Resources do not start on the "wrong" site because of:
> >         location pref_A GroupA rule -inf: site ne cityA
> >         location pref_B GroupB rule -inf: site ne cityB
> > 
> > The resources in GroupA either run in cityA or they do not run at all.
> Where did I say anything about group A or B? You have single resource
> that can migrate between sites
> location no_pref Anywhere rule -inf: site ne cityA and site ne cityB

In fact that rule turns out to be unnecessary, because of:

	colocation Ast 100: Anywhere [ GroupA GroupB ]

(apologies for the typo the first time I posted that, corrected in my previous 
reply to this one).

This ensures that the "Anywhere" resource group runs either on the machine 
which is running the "GroupA" group or the one which is running the "GroupB" 
group.  This is an added bonus which I find useful, so that only one machine at 
each site is running all the resources at that site.

> I have no idea what "Asterisk in cityA'' means because I see only one
> resource named Asterisk which is not restricted to a single site
> according to your configuration.

Ah, I see the confusion.  I used Asterisk as a simple resource in my example, 
as the thing I wanted to run just once, somewhere.

In fact, for the real setup, where GroupA and GroupB each comprise 10 
resources, and the Anywhere group comprises two, Asterisk is one of the 10 
resources which do run at both sites.

> The only resource that allegedly can migrate between sites in
> configuration you have shown so far is Asterisk.

Yes, in my example documented here.

> Now you say this resource never migrates between sites.

Yes, for my real configuration, which contains 10 resources (one of which is 
Asterisk) in each of GroupA and GroupB, and is therefore over-complicated to 
quote as a proof-of-concept here.

> I'm not sure how helpful this will be to anyone reading archives because I
> completely lost all track of what you tried to achieve.

That can be expressed very simply:

1. A group of resources named GroupA which either run in cityA or do not run 
at all.

2. A group of resources named GroupB which either run in cityB or do not run 
at all.

3. A group of resources name Anywhere which run in either cityA or cityB but 
not both.


Numerous psychological studies over the years have demonstrated that the 
majority of people genuinely believe they are not like the majority of people.

                                                   Please reply to the list;
                                                         please *don't* CC me.

More information about the Users mailing list