Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Pacemaker

RFC: Compacting constraints

 

 

Linux-HA pacemaker RSS feed   Index | Next | Previous | View Threaded


lmb at suse

Oct 29, 2009, 6:39 AM

Post #1 of 19 (829 views)
Permalink
RFC: Compacting constraints

Hi all,

I have a pretty common use case - 4-16 nodes with OCFS2 etc, hosting a
ton of Xen/KVM guests.

Compacting the OCFS2 setup was pretty easy -
http://www.advogato.org/person/lmb/diary.html?start=104 - and that part
seems short enough.

For each guest, I need an order and collocation constraint with the base
resources, which becomes complex and lengthy very quickly. Just to
illustrate my point:

colocation dummy1-c inf: base-clone dummy1
colocation dummy10-c inf: base-clone dummy10
colocation dummy11-c inf: base-clone dummy11
colocation dummy12-c inf: base-clone dummy12
colocation dummy13-c inf: base-clone dummy13
colocation dummy14-c inf: base-clone dummy14
colocation dummy15-c inf: base-clone dummy15
colocation dummy16-c inf: base-clone dummy16
colocation dummy17-c inf: base-clone dummy17
colocation dummy18-c inf: base-clone dummy18
colocation dummy19-c inf: base-clone dummy19
colocation dummy2-c inf: base-clone dummy2
colocation dummy3-c inf: base-clone dummy3
colocation dummy4-c inf: base-clone dummy4
colocation dummy5-c inf: base-clone dummy5
colocation dummy6-c inf: base-clone dummy6
colocation dummy7-c inf: base-clone dummy7
colocation dummy8-c inf: base-clone dummy8
colocation dummy9-c inf: base-clone dummy9
order dummy1-o 0: base-clone dummy1
order dummy10-o 0: base-clone dummy10
order dummy11-o 0: base-clone dummy11
order dummy12-o 0: base-clone dummy12
order dummy13-o 0: base-clone dummy13
order dummy14-o 0: base-clone dummy14
order dummy15-o 0: base-clone dummy15
order dummy16-o 0: base-clone dummy16
order dummy17-o 0: base-clone dummy17
order dummy18-o 0: base-clone dummy18
order dummy19-o 0: base-clone dummy19
order dummy2-o 0: base-clone dummy2
order dummy3-o 0: base-clone dummy3
order dummy4-o 0: base-clone dummy4
order dummy5-o 0: base-clone dummy5
order dummy6-o 0: base-clone dummy6
order dummy7-o 0: base-clone dummy7
order dummy8-o 0: base-clone dummy8
order dummy9-o 0: base-clone dummy9


There's a bunch of open issues (resource_sets not supporting score="0",
the crm shell not supporting resource_sets at all), but I'd even more
prefer if I didn't have to have both the order and collocation
constraints.

Could we introduce an "conjoin" dependency which merges both? I don't
much care whether this is done at the XML/CIB level, or at the shell
level (detect duplication and merge for the shell syntax - the advantage
would be that none of the other CIB consumers would need to be taught
about it); it should allow, of course, to specify both the ordering and
collocation scores.

So, I'd imagine that the above could be represented in the shell syntax
as:

conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
meta score_collocation=infinity score_order=0


This would be an extremely desirable usability improvement, IMNSHO. I
welcome your feedback.


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


dejanmm at fastmail

Oct 29, 2009, 8:24 AM

Post #2 of 19 (798 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

Hi,

On Thu, 29 Oct 2009 14:39 +0100, "Lars Marowsky-Bree" <lmb [at] suse>
wrote:
> Hi all,
>
> I have a pretty common use case - 4-16 nodes with OCFS2 etc, hosting a
> ton of Xen/KVM guests.
>
> Compacting the OCFS2 setup was pretty easy -
> http://www.advogato.org/person/lmb/diary.html?start=104 - and that part
> seems short enough.
>
> For each guest, I need an order and collocation constraint with the base
> resources, which becomes complex and lengthy very quickly. Just to
> illustrate my point:
>
> colocation dummy1-c inf: base-clone dummy1
> colocation dummy10-c inf: base-clone dummy10
> colocation dummy11-c inf: base-clone dummy11
> colocation dummy12-c inf: base-clone dummy12
> colocation dummy13-c inf: base-clone dummy13
> colocation dummy14-c inf: base-clone dummy14
> colocation dummy15-c inf: base-clone dummy15
> colocation dummy16-c inf: base-clone dummy16
> colocation dummy17-c inf: base-clone dummy17
> colocation dummy18-c inf: base-clone dummy18
> colocation dummy19-c inf: base-clone dummy19
> colocation dummy2-c inf: base-clone dummy2
> colocation dummy3-c inf: base-clone dummy3
> colocation dummy4-c inf: base-clone dummy4
> colocation dummy5-c inf: base-clone dummy5
> colocation dummy6-c inf: base-clone dummy6
> colocation dummy7-c inf: base-clone dummy7
> colocation dummy8-c inf: base-clone dummy8
> colocation dummy9-c inf: base-clone dummy9
> order dummy1-o 0: base-clone dummy1
> order dummy10-o 0: base-clone dummy10
> order dummy11-o 0: base-clone dummy11
> order dummy12-o 0: base-clone dummy12
> order dummy13-o 0: base-clone dummy13
> order dummy14-o 0: base-clone dummy14
> order dummy15-o 0: base-clone dummy15
> order dummy16-o 0: base-clone dummy16
> order dummy17-o 0: base-clone dummy17
> order dummy18-o 0: base-clone dummy18
> order dummy19-o 0: base-clone dummy19
> order dummy2-o 0: base-clone dummy2
> order dummy3-o 0: base-clone dummy3
> order dummy4-o 0: base-clone dummy4
> order dummy5-o 0: base-clone dummy5
> order dummy6-o 0: base-clone dummy6
> order dummy7-o 0: base-clone dummy7
> order dummy8-o 0: base-clone dummy8
> order dummy9-o 0: base-clone dummy9
>
>
> There's a bunch of open issues (resource_sets not supporting score="0",
> the crm shell not supporting resource_sets at all),

That's on the todo list, I've even started working on it, but then had
an issue with funny way resource sets are constructed in CIB. We had a
discussion about that last year.

> but I'd even more
> prefer if I didn't have to have both the order and collocation
> constraints.
>
> Could we introduce an "conjoin" dependency which merges both? I don't
> much care whether this is done at the XML/CIB level, or at the shell
> level (detect duplication and merge for the shell syntax - the advantage
> would be that none of the other CIB consumers would need to be taught
> about it); it should allow, of course, to specify both the ordering and
> collocation scores.
>
> So, I'd imagine that the above could be represented in the shell syntax
> as:
>
> conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
> meta score_collocation=infinity score_order=0

There are no shell constructs which are rendered as two or more CIB
elements. I guess that this should be possible, but really can't say
until I take a thorough look at the implementation. BTW, I guess that
there are other CIB phrases which are commonly in use.

Thanks,

Dejan

> This would be an extremely desirable usability improvement, IMNSHO. I
> welcome your feedback.
>
>
> Regards,
> Lars
>
> --
> Architect Storage/HA, OPS Engineering, Novell, Inc.
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker [at] oss
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

--
http://www.fastmail.fm - Send your email first class


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Oct 30, 2009, 3:05 AM

Post #3 of 19 (792 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-10-29T16:24:08, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:

> > There's a bunch of open issues (resource_sets not supporting score="0",
> > the crm shell not supporting resource_sets at all),
> That's on the todo list, I've even started working on it, but then had
> an issue with funny way resource sets are constructed in CIB. We had a
> discussion about that last year.

Can you remind me/us please? Maybe we can fix some of the details still.
I admit I can't find the discussion from last year any more,
unfortunately.

In particular the rsc_order support for resource sets doesn't just not
support score="", but also not the for/then action bits, which I think
might be extremely useful if I want to order several resources after a
master promotion; this also applies to collocation (and I also can't
collocate several resources with a node attribute).

So I think the rsc sets still need a bit of fixing.

> There are no shell constructs which are rendered as two or more CIB
> elements. I guess that this should be possible, but really can't say
> until I take a thorough look at the implementation.

That'd be cool. This would be much within the spirit of the CIB
representing atomic objects and management tools providing higher-level
abstraction.

> BTW, I guess that there are other CIB phrases which are commonly in
> use.

Right, but I think the "order A after B; collocation B with A" is likely
the most common expression; we've got to start somewhere ;-)


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


dejanmm at fastmail

Oct 30, 2009, 7:28 AM

Post #4 of 19 (793 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

Hi,

On Fri, 30 Oct 2009 11:05 +0100, "Lars Marowsky-Bree" <lmb [at] suse>
wrote:
> On 2009-10-29T16:24:08, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:
>
> > > There's a bunch of open issues (resource_sets not supporting score="0",
> > > the crm shell not supporting resource_sets at all),
> > That's on the todo list, I've even started working on it, but then had
> > an issue with funny way resource sets are constructed in CIB. We had a
> > discussion about that last year.
>
> Can you remind me/us please? Maybe we can fix some of the details still.
> I admit I can't find the discussion from last year any more,
> unfortunately.
>
> In particular the rsc_order support for resource sets doesn't just not
> support score="", but also not the for/then action bits, which I think
> might be extremely useful if I want to order several resources after a
> master promotion; this also applies to collocation (and I also can't
> collocate several resources with a node attribute).
>
> So I think the rsc sets still need a bit of fixing.

That'd be great. I'll dig the discussion (should be somewhere) and
produce
a digest.

> > There are no shell constructs which are rendered as two or more CIB
> > elements. I guess that this should be possible, but really can't say
> > until I take a thorough look at the implementation.
>
> That'd be cool. This would be much within the spirit of the CIB
> representing atomic objects and management tools providing higher-level
> abstraction.

Agreed.

> > BTW, I guess that there are other CIB phrases which are commonly in
> > use.
>
> Right, but I think the "order A after B; collocation B with A" is likely
> the most common expression; we've got to start somewhere ;-)

Groups :) It's just that ms resources can't belong to a group.

Thanks,

Dejan

>
> Regards,
> Lars
>
> --
> Architect Storage/HA, OPS Engineering, Novell, Inc.
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker [at] oss
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

--
http://www.fastmail.fm - One of many happy users:
http://www.fastmail.fm/docs/quotes.html


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Oct 30, 2009, 10:15 AM

Post #5 of 19 (790 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-10-30T15:28:00, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:

> > > BTW, I guess that there are other CIB phrases which are commonly in
> > > use.
> > Right, but I think the "order A after B; collocation B with A" is likely
> > the most common expression; we've got to start somewhere ;-)
> Groups :) It's just that ms resources can't belong to a group.

Groups aren't powerful enough for a variety of reasons.

Resources can only be part of one group, for example. And
ordering/collocating an unordered/uncollocated group with a clone also
doesn't work.

My educated guess is that this is because groups were meant to handle
simple things, and abusing them for something complex doesn't work out
well ;-)


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


andrew at beekhof

Nov 5, 2009, 3:17 AM

Post #6 of 19 (787 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On Thu, Oct 29, 2009 at 2:39 PM, Lars Marowsky-Bree <lmb [at] suse> wrote:
> Hi all,
>
> I have a pretty common use case - 4-16 nodes with OCFS2 etc, hosting a
> ton of Xen/KVM guests.
>
> Compacting the OCFS2 setup was pretty easy -
> http://www.advogato.org/person/lmb/diary.html?start=104 - and that part
> seems short enough.
>
> For each guest, I need an order and collocation constraint with the base
> resources, which becomes complex and lengthy very quickly. Just to
> illustrate my point:
>
> colocation dummy1-c inf: base-clone dummy1
> colocation dummy10-c inf: base-clone dummy10
> colocation dummy11-c inf: base-clone dummy11
> colocation dummy12-c inf: base-clone dummy12
> colocation dummy13-c inf: base-clone dummy13
> colocation dummy14-c inf: base-clone dummy14
> colocation dummy15-c inf: base-clone dummy15
> colocation dummy16-c inf: base-clone dummy16
> colocation dummy17-c inf: base-clone dummy17
> colocation dummy18-c inf: base-clone dummy18
> colocation dummy19-c inf: base-clone dummy19
> colocation dummy2-c inf: base-clone dummy2
> colocation dummy3-c inf: base-clone dummy3
> colocation dummy4-c inf: base-clone dummy4
> colocation dummy5-c inf: base-clone dummy5
> colocation dummy6-c inf: base-clone dummy6
> colocation dummy7-c inf: base-clone dummy7
> colocation dummy8-c inf: base-clone dummy8
> colocation dummy9-c inf: base-clone dummy9
> order dummy1-o 0: base-clone dummy1
> order dummy10-o 0: base-clone dummy10
> order dummy11-o 0: base-clone dummy11
> order dummy12-o 0: base-clone dummy12
> order dummy13-o 0: base-clone dummy13
> order dummy14-o 0: base-clone dummy14
> order dummy15-o 0: base-clone dummy15
> order dummy16-o 0: base-clone dummy16
> order dummy17-o 0: base-clone dummy17
> order dummy18-o 0: base-clone dummy18
> order dummy19-o 0: base-clone dummy19
> order dummy2-o 0: base-clone dummy2
> order dummy3-o 0: base-clone dummy3
> order dummy4-o 0: base-clone dummy4
> order dummy5-o 0: base-clone dummy5
> order dummy6-o 0: base-clone dummy6
> order dummy7-o 0: base-clone dummy7
> order dummy8-o 0: base-clone dummy8
> order dummy9-o 0: base-clone dummy9
>
>
> There's a bunch of open issues (resource_sets not supporting score="0",
> the crm shell not supporting resource_sets at all), but I'd even more
> prefer if I didn't have to have both the order and collocation
> constraints.
>
> Could we introduce an "conjoin" dependency which merges both?

What about an ordered=(FALSE|true) attribute for colocation constraints?

first == rsc, then == with-rsc, *-action would be set based on the
rsc(-with)-role

I mean, we could create a new construct, but I'm worried it might
cause (additional) confusion.

> I don't
> much care whether this is done at the XML/CIB level, or at the shell
> level (detect duplication and merge for the shell syntax - the advantage
> would be that none of the other CIB consumers would need to be taught
> about it); it should allow, of course, to specify both the ordering and
> collocation scores.
>
> So, I'd imagine that the above could be represented in the shell syntax
> as:
>
> conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
>        meta score_collocation=infinity score_order=0
>
>
> This would be an extremely desirable usability improvement, IMNSHO. I
> welcome your feedback.
>
>
> Regards,
>    Lars
>
> --
> Architect Storage/HA, OPS Engineering, Novell, Inc.
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker [at] oss
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


dejanmm at fastmail

Nov 5, 2009, 7:57 AM

Post #7 of 19 (782 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

Hi,

On Thu, Nov 05, 2009 at 12:17:56PM +0100, Andrew Beekhof wrote:
> On Thu, Oct 29, 2009 at 2:39 PM, Lars Marowsky-Bree <lmb [at] suse> wrote:
> > Hi all,
> >
> > I have a pretty common use case - 4-16 nodes with OCFS2 etc, hosting a
> > ton of Xen/KVM guests.
> >
> > Compacting the OCFS2 setup was pretty easy -
> > http://www.advogato.org/person/lmb/diary.html?start=104 - and that part
> > seems short enough.
> >
> > For each guest, I need an order and collocation constraint with the base
> > resources, which becomes complex and lengthy very quickly. Just to
> > illustrate my point:
> >
> > colocation dummy1-c inf: base-clone dummy1
[repetitive stuff illustrating the point cut]
> > order dummy1-o 0: base-clone dummy1
[again]
> >
> > There's a bunch of open issues (resource_sets not supporting score="0",
> > the crm shell not supporting resource_sets at all), but I'd even more
> > prefer if I didn't have to have both the order and collocation
> > constraints.
> >
> > Could we introduce an "conjoin" dependency which merges both?
>
> What about an ordered=(FALSE|true) attribute for colocation constraints?
>
> first == rsc, then == with-rsc, *-action would be set based on the
> rsc(-with)-role

Would that work?

> I mean, we could create a new construct, but I'm worried it might
> cause (additional) confusion.

I think that such a construct would be useful, but I'm more
inclined to have it at the shell level and that it would actually
have predefined scores, e.g.

conjoin base-clone dummy1 [dummy2 ...]

would expand into those two constraints. No promises yet, since
I'm still not sure how difficult that would be to implement.
Expansion is obviously not a problem, but the other direction may
easily be one. Also, I think I'd prefer to have this as a very
simple and obvious construct, without any extra embelishments as
it has been suggested by Lars below. Simply because I believe
that there are just a few of such order/collocation combinations
which would be used.

"conjoin" sounds sort of funny to me (as a non-native speaker).
And, further, the existing constraints are all nouns, so this one
should be a noun too (though I'd really much prefer verb, but I
guess that it may be too late for that). I think I'll pick that
underused Roget's Thesaurus.

Thanks,

Dejan

> > I don't
> > much care whether this is done at the XML/CIB level, or at the shell
> > level (detect duplication and merge for the shell syntax - the advantage
> > would be that none of the other CIB consumers would need to be taught
> > about it); it should allow, of course, to specify both the ordering and
> > collocation scores.
> >
> > So, I'd imagine that the above could be represented in the shell syntax
> > as:
> >
> > conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
> >        meta score_collocation=infinity score_order=0
> >
> >
> > This would be an extremely desirable usability improvement, IMNSHO. I
> > welcome your feedback.
> >
> >
> > Regards,
> >    Lars
> >
> > --
> > Architect Storage/HA, OPS Engineering, Novell, Inc.
> > SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> > "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
> >
> >
> > _______________________________________________
> > Pacemaker mailing list
> > Pacemaker [at] oss
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker [at] oss
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


dejanmm at fastmail

Nov 5, 2009, 8:00 AM

Post #8 of 19 (783 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

Hi,

On Fri, Oct 30, 2009 at 06:15:34PM +0100, Lars Marowsky-Bree wrote:
> On 2009-10-30T15:28:00, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:
>
> > > > BTW, I guess that there are other CIB phrases which are commonly in
> > > > use.
> > > Right, but I think the "order A after B; collocation B with A" is likely
> > > the most common expression; we've got to start somewhere ;-)
> > Groups :) It's just that ms resources can't belong to a group.
>
> Groups aren't powerful enough for a variety of reasons.
>
> Resources can only be part of one group, for example. And
> ordering/collocating an unordered/uncollocated group with a clone also
> doesn't work.
>
> My educated guess is that this is because groups were meant to handle
> simple things, and abusing them for something complex doesn't work out
> well ;-)

OK, OK, it was just that it reminded me of groups. Though having
a pattern which repeats must indicate that there is a concept
which may be named behind it. Now, if you find a single-word
name, which would be easily recognized by the rest of HA
population...

Thanks,

Dejan

>
>
> Regards,
> Lars
>
> --
> Architect Storage/HA, OPS Engineering, Novell, Inc.
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker [at] oss
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


dejanmm at fastmail

Nov 5, 2009, 8:18 AM

Post #9 of 19 (786 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

Hi,

On Fri, Oct 30, 2009 at 11:05:46AM +0100, Lars Marowsky-Bree wrote:
> On 2009-10-29T16:24:08, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:
>
> > > There's a bunch of open issues (resource_sets not supporting score="0",
> > > the crm shell not supporting resource_sets at all),
> > That's on the todo list, I've even started working on it, but then had
> > an issue with funny way resource sets are constructed in CIB. We had a
> > discussion about that last year.
>
> Can you remind me/us please? Maybe we can fix some of the details still.
> I admit I can't find the discussion from last year any more,
> unfortunately.

Here the resource sets discussion digest. It's a very simple
thing: I find that the place for action/role in the definition of
the resource_set is wrong, i.e. now it looks like this:

<resource_set id="o1-0" role="Master">
<resource_ref id="d"/>
</resource_set>

but it should be like this:

<resource_set id="o1-0">
<resource_ref id="d" role="Master"/>
</resource_set>

Because of this, all resources in a set must have a same
role/action. Consequently, a change of role/action in a
resource_set results in two (or three) resource_set constructs.
For example:

<resource_set id="o1-0" role="Master">
<resource_ref id="d"/>
</resource_set>
<resource_set id="o1-0">
<resource_ref id="e"/>
<resource_ref id="f"/>
</resource_set>

as opposed to:

<resource_set id="o1-0">
<resource_ref id="d" role="Master"/>
<resource_ref id="e"/>
<resource_ref id="f"/>
</resource_set>

Now, Andrew finds that this is a negligible issue, but I'm really
not so sure about it, since it may at times prevent us from
exactly expressing configurations. Not to mention that it has
been a pita to implement it in shell (though I survived).

> In particular the rsc_order support for resource sets doesn't just not
> support score="",

It supports scores within resource sets. Don't know if that's
enough, i.e. no idea which score is applied between the resource
sets within a single constraint.

> but also not the for/then action bits,

Don't follow. Which bits? Is that what the digest above is about?

> which I think
> might be extremely useful if I want to order several resources after a
> master promotion; this also applies to collocation (and I also can't
> collocate several resources with a node attribute).
>
> So I think the rsc sets still need a bit of fixing.
>
> > There are no shell constructs which are rendered as two or more CIB
> > elements. I guess that this should be possible, but really can't say
> > until I take a thorough look at the implementation.
>
> That'd be cool. This would be much within the spirit of the CIB
> representing atomic objects and management tools providing higher-level
> abstraction.
>
> > BTW, I guess that there are other CIB phrases which are commonly in
> > use.
>
> Right, but I think the "order A after B; collocation B with A" is likely
> the most common expression; we've got to start somewhere ;-)

Of course.

Thanks,

Dejan

>
> Regards,
> Lars
>
> --
> Architect Storage/HA, OPS Engineering, Novell, Inc.
> SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker [at] oss
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


andrew at beekhof

Nov 5, 2009, 10:13 AM

Post #10 of 19 (785 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On Thu, Nov 5, 2009 at 4:57 PM, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:
> Hi,
>
> On Thu, Nov 05, 2009 at 12:17:56PM +0100, Andrew Beekhof wrote:
>> On Thu, Oct 29, 2009 at 2:39 PM, Lars Marowsky-Bree <lmb [at] suse> wrote:
>> > Could we introduce an "conjoin" dependency which merges both?
>>
>> What about an ordered=(FALSE|true) attribute for colocation constraints?
>>
>>   first == rsc, then == with-rsc, *-action would be set based on the
>> rsc(-with)-role
>
> Would that work?

Why wouldn't it?

>> I mean, we could create a new construct, but I'm worried it might
>> cause (additional) confusion.
>
> I think that such a construct would be useful, but I'm more
> inclined to have it at the shell level and that it would actually
> have predefined scores, e.g.
>
> conjoin base-clone dummy1 [dummy2 ...]
>
> would expand into those two constraints. No promises yet, since
> I'm still not sure how difficult that would be to implement.
> Expansion is obviously not a problem, but the other direction may
> easily be one.

Thats what I'd worry about.
I'm happy to have it at the cib level, I'm just not sure we want to
invent a whole new object for it.
It would make swapping between the two cases annoying.

> Also, I think I'd prefer to have this as a very
> simple and obvious construct, without any extra embelishments as
> it has been suggested by Lars below. Simply because I believe
> that there are just a few of such order/collocation combinations
> which would be used.
>
> "conjoin" sounds sort of funny to me (as a non-native speaker).

Equally so to me, and Australian is kinda like english.

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


TSERONG at novell

Nov 5, 2009, 9:34 PM

Post #11 of 19 (771 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 11/6/2009 at 05:13 AM, Andrew Beekhof <andrew [at] beekhof> wrote:
> On Thu, Nov 5, 2009 at 4:57 PM, Dejan Muhamedagic <dejanmm [at] fastmail> wrote:
> >
> > "conjoin" sounds sort of funny to me (as a non-native speaker).
>
> Equally so to me, and Australian is kinda like english.

How about "coordinate"?

Tim


--
Tim Serong <tserong [at] novell>
Senior Clustering Engineer, Novell Inc.




_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


colin.hch at gmail

Nov 6, 2009, 1:13 PM

Post #12 of 19 (769 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

> conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
>        meta score_collocation=infinity score_order=0

Suppose we allow regular expressions:

order dummy(\d+)-o 0: base-clone dummy#1

(Where \d is a digit, and #1 inserts the string that matched the first
bracketed sub-regular-expression from the "other" resource name...

Just thinking out loud, regexes could make so many things shorter...

Regards, Colin

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


andrew at beekhof

Nov 9, 2009, 2:16 AM

Post #13 of 19 (769 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On Fri, Nov 6, 2009 at 10:13 PM, Colin <colin.hch [at] gmail> wrote:
>> conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
>>        meta score_collocation=infinity score_order=0
>
> Suppose we allow regular expressions:
>
> order dummy(\d+)-o 0: base-clone dummy#1
>
> (Where \d is a digit, and #1 inserts the string that matched the first
> bracketed sub-regular-expression from the "other" resource name...

/me runs

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Nov 11, 2009, 5:43 AM

Post #14 of 19 (744 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-11-05T12:17:56, Andrew Beekhof <andrew [at] beekhof> wrote:

> > Could we introduce an "conjoin" dependency which merges both?
> What about an ordered=(FALSE|true) attribute for colocation constraints?

That sucks completely, IMHO. I already hate the "sequential" attribute
in resource_sets passionately (it's named differently than everywhere
else ("order")), and it muddles up the distinction between order and
placement which is fundamental to the whole constraint design.

Why add it to the collocation, why not to ordered? Maybe make both of
them go away? Yuck! This is the design police, you've just been ticketed
;-)

Also, this wouldn't allow different scores for the order/colocation
constraints easily, which is, for example, needed for primitives
depending on clones.

The shell having a higher abstraction level than the CIB, on the other
hand, now that makes sense to me, so compacting the representation of
CIB elements there strikes me as useful.


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Nov 11, 2009, 5:46 AM

Post #15 of 19 (745 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-11-05T22:34:32, Tim Serong <TSERONG [at] novell> wrote:

> > > "conjoin" sounds sort of funny to me (as a non-native speaker).
> > Equally so to me, and Australian is kinda like english.
> How about "coordinate"?

I went through the possible associations here, and I realize that
"conjoin" is a rare word in English. In theory though, "conjoin" more
readily implies an order/merge thing going on compared to "coordinate".

If one wants to be more clear, "with_after", "along_with" would work
too. But I thought "conjoin" was more, well, compact ;-)


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Nov 11, 2009, 5:49 AM

Post #16 of 19 (747 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-11-06T22:13:32, Colin <colin.hch [at] gmail> wrote:

> > conjoin dummies-dep base-clone {dummy1, dummy2, dummy3, ...} \
> >        meta score_collocation=infinity score_order=0
>
> Suppose we allow regular expressions:
>
> order dummy(\d+)-o 0: base-clone dummy#1
>
> (Where \d is a digit, and #1 inserts the string that matched the first
> bracketed sub-regular-expression from the "other" resource name...
>
> Just thinking out loud, regexes could make so many things shorter...

Woah, you've just officially scared me. ;-)

The problem with your example of course is that it is not clear what to
iterate over. In the above, there's no dummy\d+-o to match yet; in fact,
that is what you'd want to create. So in theory, you'd want this the
other way around - match on the dummy\d+ resource reference and expand
the order constraint from that, which doesn't work well with XML. So, I
think the expansion is right out, because this would never be gotten
right.

If you're saying to allow regex - or at least basic shell pattern -
matching in a resource reference, say a resource set - where actually
each set expands to many resources anyway, now that would possibly be a
clean syntax extension.

ie:

order dummy-o: base-clone (dummy[0-9]+)


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Nov 11, 2009, 6:12 AM

Post #17 of 19 (743 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-11-11T14:46:02, Lars Marowsky-Bree <lmb [at] suse> wrote:

> I went through the possible associations here, and I realize that
> "conjoin" is a rare word in English. In theory though, "conjoin" more
> readily implies an order/merge thing going on compared to "coordinate".
>
> If one wants to be more clear, "with_after", "along_with" would work
> too. But I thought "conjoin" was more, well, compact ;-)

Some further thoughts on the bike shed's color - "join", "connect",
"link".


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


andrew at beekhof

Nov 12, 2009, 5:41 AM

Post #18 of 19 (741 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On Wed, Nov 11, 2009 at 3:12 PM, Lars Marowsky-Bree <lmb [at] suse> wrote:
> On 2009-11-11T14:46:02, Lars Marowsky-Bree <lmb [at] suse> wrote:
>
>> I went through the possible associations here, and I realize that
>> "conjoin" is a rare word in English. In theory though, "conjoin" more
>> readily implies an order/merge thing going on compared to "coordinate".
>>
>> If one wants to be more clear, "with_after", "along_with" would work
>> too. But I thought "conjoin" was more, well, compact ;-)
>
> Some further thoughts on the bike shed's color - "join", "connect",
> "link".

Did you create a bug for all this?

_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker


lmb at suse

Nov 12, 2009, 5:48 AM

Post #19 of 19 (739 views)
Permalink
Re: RFC: Compacting constraints [In reply to]

On 2009-11-12T14:41:49, Andrew Beekhof <andrew [at] beekhof> wrote:

> On Wed, Nov 11, 2009 at 3:12 PM, Lars Marowsky-Bree <lmb [at] suse> wrote:
> > On 2009-11-11T14:46:02, Lars Marowsky-Bree <lmb [at] suse> wrote:
> >
> >> I went through the possible associations here, and I realize that
> >> "conjoin" is a rare word in English. In theory though, "conjoin" more
> >> readily implies an order/merge thing going on compared to "coordinate".
> >>
> >> If one wants to be more clear, "with_after", "along_with" would work
> >> too. But I thought "conjoin" was more, well, compact ;-)
> >
> > Some further thoughts on the bike shed's color - "join", "connect",
> > "link".
>
> Did you create a bug for all this?

I've found bugzilla to be quite annoying for discussions, so I first
wanted to discuss if/what/how to go about this before filing an
enhancement bugzilla.

Since we've not yet quite agreed whether this should be a shell macro,
or a new CIB construct (despite me of course having the right answer
;-), I wasn't sure we were at the enhancement request stage yet ...

I'll go ahead and file that though.


Regards,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde


_______________________________________________
Pacemaker mailing list
Pacemaker [at] oss
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Linux-HA pacemaker RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.