[Pacemaker] Help understanding multi-state scores

Andrew Beekhof andrew at beekhof.net
Thu Jun 21 08:08:10 UTC 2012


On Thu, Jun 21, 2012 at 5:40 PM, aldo sarmiento <sarmiena at gmail.com> wrote:
> Very helpful, yes.
>
> One last thing: why are the preferences named "clone_color" and
> "native_color"?

Those are the function names.
"clone" and "native" come from the type of resource being allocated,
"color" dates back to when there was a "graph coloring" phase to the
algorithm.

>
> Thanks
>
> On Wed, Jun 20, 2012 at 7:24 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
>>
>> On Tue, Jun 12, 2012 at 7:01 AM, aldo sarmiento <sarmiena at gmail.com>
>> wrote:
>> > Hello,
>> >
>> > I'm trying to figure out how a multi-state (conntrackd) configuration w/
>> > colocation (IPaddr2) gets scored.
>> >
>> > The configuration: http://pastie.org/private/cwto8b0v3ep5e6d6crmgfa
>> >
>> > The scoring: http://pastie.org/private/mlfv8txukj0na7zsejgyna
>> >
>> > The thing I am kind of confused about are:
>> >
>> > What is clone_color
>> > What is native_color
>>
>> These are two functions that deal with resource allocation.
>> They display the preference a resource has for a given node at
>> different stages of the node allocation process.
>>
>> > How do they apply to lines 7-16 (in
>> > pastie: http://pastie.org/private/mlfv8txukj0na7zsejgyna)
>> > Line 15 has a score of -INFINITY. Why and where did this come from?
>>
>> At the point clone_color runs, none of the resources in that clone
>> have been allocated yet.
>>
>> clone_color: ms-conntrackd allocation score on fw01: 10000
>> clone_color: ms-conntrackd allocation score on fw02: 5000
>>
>> Lines 7-8 (above archival purposes) are the the scores for the clone
>> container.  They don't really matter but can be a useful sanity check
>> as they'll be the simple sum of any location constraint scores.
>>
>> clone_color: updated-conntrackd:0 allocation score on fw01: 11001
>> clone_color: updated-conntrackd:0 allocation score on fw02: 5000
>> clone_color: updated-conntrackd:1 allocation score on fw01: 10000
>> clone_color: updated-conntrackd:1 allocation score on fw02: 5101
>>
>> Lines 9-12 (above) are the scores for the primitive resources that the
>> clone is made up of.
>> These scores also include stickiness where appropriate and any scores
>> inherited via colocation.
>>
>> native_color: updated-conntrackd:0 allocation score on fw01: 11001
>> native_color: updated-conntrackd:0 allocation score on fw02: 5000
>>
>> Lines 13-14 (above) are the same as their equivalents (9-10) because
>> no other members have been allocated yet.
>>
>> native_color: updated-conntrackd:1 allocation score on fw01: -INFINITY
>> native_color: updated-conntrackd:1 allocation score on fw02: 5101
>>
>> The difference between native_color and clone_color are best
>> demonstrated by lines 15-16 (above).
>> By the time these lines are shown, the :0 instance of the clone has
>> been allocated and this is reflected in the scores.
>> Whereas line 11 showed a score of 10000 for fw01, we now show
>> -INFINITY because another member of the clone ( :0 ) is active there -
>> and since clone-node-max="1", we must choose another location for the
>> :1 instance.
>>
>> updated-conntrackd:0 promotion score on fw01: 11000
>> updated-conntrackd:1 promotion score on fw02: 5100
>>
>> And finally, since the clone is also a multi-state resource, we have
>> the promotion scores which indicate that we'll promote
>> updated-conntrackd:0 on fw01.
>>
>>
>>
>> Does that help?
>>
>> _______________________________________________
>> 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