[Pacemaker] RFC: Compacting constraints
Dejan Muhamedagic
dejanmm at fastmail.fm
Thu Nov 5 16:18:23 UTC 2009
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.fm> 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.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
More information about the Pacemaker
mailing list