[Pacemaker] [pacemaker][patch 3/4] Simple changes for "Pacemaker Explained", Chapter 6 CH_Constraints.xml

Andrew Beekhof andrew at beekhof.net
Mon Apr 11 22:23:09 CET 2011


On Mon, Apr 11, 2011 at 2:18 PM, Tim Serong <tserong at novell.com> wrote:
> On 4/11/2011 at 09:37 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
>> On Mon, Apr 11, 2011 at 12:57 PM, Tim Serong <tserong at novell.com> wrote:
>> > On 3/21/2011 at 08:20 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
>> >>
>> >> Small improvement to:
>> >> +     The only thing that matters is that in order for any member of a set
>> >> to be active, all the members of the previous set must also be active
>> >> (and naturally on the same node). When a set has
>> >> <literal>sequential="true"</literal>, then in order for any member to
>> >> be active, the previous members must also be active.
>> >>
>> >> +     The only thing that matters is that in order for any member of a set
>> >> to be active, all the members of the previous set<footnote><para>as
>> >> determined by the display order in the configuration</para></footnote>
>> >> must also be active (and naturally on the same node).
>> >> + When a set has <literal>sequential="true"</literal>, then in order
>> >> for any member to be active, the previous members must also be active.
>> >
>> > This isn't quite correct.
>> >
>> > For members within a set (sequential=true), it is true that for a given
>> > member to be active, the previous members must also be active.
>> >
>> > Between sets however, it's the other way around - a given set depends on
>> > the subsequent set.
>>
>> Did I really write it like that? You tested it?
>
> Yup.  Well, I tested it (pcmk 1.1.5), so I assume you wrote it like that :)
>
> We want (pardon the ASCII art):
>
>             /--> C --\
>  G --> F --+---> D ---+--> B --> A
>             \--> E --/
>
> Test is:
>
>  # crm configure colocation c inf: F G ( C D E ) A B

Given the well discussed issues with the shell syntax, I'd prefer to
see the raw xml actually.

>  # crm resource stop F
>     (stops F and G)
>  # crm resource start F
>  # crm resource stop D
>     (stops D, F and G)
>  # crm resource start D
>  # crm resource stop B
>     (stops everything except A)
>
> That shell colocation constraint maps exactly to the (new) XML shown below
> (verified just in case it turned out to be a shell oddity).
>
>> If so, thats just retarded and needs an overhaul.
>
> It is a little... confusing.
>
> Regards,
>
> Tim
>
>> >
>> > The example colocation chain in Pacemaker Explained right now should thus
>> > be changed as follows in order to match the diagram:
>> >
>> >  <constraints>
>> >    <rsc_colocation id="coloc-1" score="INFINITY" >
>> >       <resource_set id="collocated-set-1" sequential="true">
>> > -        <resource_ref id="A"/>
>> > -        <resource_ref id="B"/>
>> > +        <resource_ref id="F"/>
>> > +        <resource_ref id="G"/>
>> >      </resource_set>
>> >      <resource_set id="collocated-set-2" sequential="false">
>> >        <resource_ref id="C"/>
>> >        <resource_ref id="D"/>
>> >        <resource_ref id="E"/>
>> >      </resource_set>
>> >      <resource_set id="collocated-set-2" sequential="true" role="Master">
>> > -        <resource_ref id="F"/>
>> > -        <resource_ref id="G"/>
>> > +        <resource_ref id="A"/>
>> > +        <resource_ref id="B"/>
>> >      </resource_set>
>> >    </rsc_colocation>
>> >  </constraints>
>> >
>> > Regards,
>> >
>> > Tim
>> >
>> >
>> > --
>> > Tim Serong <tserong at novell.com>
>> > Senior Clustering Engineer, OPS Engineering, Novell Inc.
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>> >
>>
>
>
>
>
> --
> Tim Serong <tserong at novell.com>
> Senior Clustering Engineer, OPS Engineering, Novell Inc.
>
>
>
> _______________________________________________
> 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>



More information about the Pacemaker mailing list