[Linux-HA] Score Calculation

Dominik Klein dk at in-telegence.net
Thu Sep 13 03:53:46 MDT 2007


Hi

I did some tests on score calculation as I could not find a good web 
resource on this. Now I would like to get this confirmed or corrected.

Suppose I have a resource with a resource location constraint wit score 
300 for node A, score 250 for node B, resource stickiness = 200, failure 
stickiness = -100.

Startup. Resource goes to node A with score 300, gets the stickiness 
addition and scores end up with A=500, B=250

Now say the monitor action on the resource reports an error. Failcount 
on A is increased, scores are recalculated. Is the following correct?:

score + stickiness + (failcount*failurestickiness) = actualscore
So in my exmaple
300+200+(1*(-100))=400

This would make it A=400, B=250, so the resource would get stop/started 
on A, no more calculation is done. Correct?

Another question:
Back to the top first, A=500, B=250, Resource running on A. All 
failcounts=0.

Now say the monitor action reports the resource is not running. 
Failcount on A is increased and scores are recalculated. Is the 
following difference (to the first calculation) correct?

score+(failcount*failurestickiness)=actualscore
So in my example
300+(1*(-100))=200

So A=200, B=250, Resource gets stop on A, start on B. *Afterwards*, B 
gets the stickiness Bonus of +200, so it ends up with
A=200, B=450.
Is this correct?

Is there any website that describes these calculations?

Regards
Dominik



More information about the Linux-HA mailing list