[Pacemaker] Confusing semantics of colocation sets (stopping resource stops others in colocation / order sets)

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Jul 2 16:50:22 UTC 2012


Hi,

On Mon, Jun 18, 2012 at 11:02:32AM -0400, Jake Smith wrote:
> 
> ----- Original Message -----
> > From: "Phil Frost" <phil at macprofessionals.com>
> > To: pacemaker at oss.clusterlabs.org
> > Sent: Monday, June 18, 2012 10:39:24 AM
> > Subject: Re: [Pacemaker] Confusing semantics of colocation sets (stopping resource stops others in colocation / order
> > sets)
> > 
> > On 06/15/2012 05:00 PM, Jake Smith wrote:
> > > # also creates three sets
> > > colocation colo inf: A B C:Master D E
> > > # B ->  A ->  C ->  E ->  D
> > > Yes because C is a stateful resource.  When you tested this I
> > > assume you used Dummy resource for A,B,D,E and a Stateful resource
> > > for primitive_C and created a master/slave ms_C resource to use in
> > > the colocation statement?
> > 
> > No, just used "configure show xml" to see what CRM was doing
> > actually.
> > 
> > >> The notion of creating a resource set when nothing in the syntax
> > >> suggests is surprising. It also makes impossible some things, like
> > >> a
> > >> group with two resources and role="Master", such as example 6.17
> > >> in
> > > Can you elaborate on what you mean by "group with two resources and
> > > role='Master'" is impossible?
> > 
> > After testing, I guess it's not impossible. It's just really
> > confusing.
> > Guess what this does:
> > 
> > colocation c inf: ( ms_A:Master ms_B:Master ms_C:Master D )
> > 
> > It's one non-sequential resource set, right? No, that's not possible,
> > because the role is set per-set, so can't be both master and null. So
> > it's an error, right? Also no. It's actually two resource sets, which
> > you can see after you have CRM tell you what it did:
> 
> I think you're confusing how resource sets get created... they are created by having more than two resources in the statement; then it creates the different sets based upon like roles listed in order.  The parenthesis make them non-sequential; they don't define how to create the set.

Right.

> > crm(live)configure# show c
> > colocation c inf: ( ms_A:Master ms_B:Master ms_C:Master ) ( D )
> > 
> > The problem is that CRM syntax suggests that the role is a
> > per-resource
> > property, but it's actually a per-resource-set property. To
> > accommodate
> > this disparity in syntax, it mangles what you said into a valid XML
> > configuration in a complex and surprising way, and when that's
> > impossible, it just does something else.
> > 
> > Sure, the mangling is easy to understand once you understand how the
> > syntaxes are different and what mangling is necessary, but it's
> > surprising, undocumented, and not otherwise useful. Wouldn't it just
> > be
> > better if no mangling was required?

What is being mangled actually? The crm shell does what is
possible given the pacemaker RNG schema. It is unfortunate that
the design is slightly off, but that cannot be fixed in the crm
syntax.

> I don't know if you've looked at the cli documentation but it might be helpful since the cli does differ slightly in syntax from the xml:
> 
> http://www.clusterlabs.org/doc/crm_cli.html

Unfortunately, that document is a bit outdated. Everything in
there still holds, but there's plenty of new features. Since the
shell is not part of pacemaker any more, it should probably be
removed. Best to peruse the man page: crm(8).

Thanks,

Dejan

> Jake
> 
> > 
> > 
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> > 
> > Project Home: http://www.clusterlabs.org
> > Getting started:
> > http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
> > 
> > 
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Pacemaker mailing list