[Linux-HA] about the resource stickiness
Andrew Beekhof
beekhof at gmail.com
Tue Oct 10 05:52:20 MDT 2006
On 10/10/06, TORRESANI, Roberto <roberto.torresani at unitn.it> wrote:
>
>
> >-----Original Message-----
> >From: linux-ha-bounces at lists.linux-ha.org
> >[mailto:linux-ha-bounces at lists.linux-ha.org] On Behalf Of
> >Andrew Beekhof
> >Sent: Monday, October 09, 2006 2:59 PM
> >To: General Linux-HA mailing list
> >Subject: Re: RE: Re: [Linux-HA] about the resource stickiness
> >
> >just a quick thing... i'd recommend running crm_verify on your
> >configuration
>
> Ok.
> I run it and it complains about some timeout not set (I'll set up now)
> and stonith not enabled.
> I realize now that values different from 0 or +-INFINITY can be
> specified only in default_resource_stickiness and
> resource_failure_stickiness.
>
> Anyway (sorry for bothering you), can you please tell me (to the list,
> or maybe I'm the only one that have yet not understood this ;-) ) how is
> the score of the node calculated in presence of colocation constraints?
>
> I understand that the score of one group is given by:
>
> resource_stickiness * nr_resources_in_the_group
>
> But when a colocation constraint is present the things gets more
> complicated to me (look at the apache_grp + mysql_grp in my cib).
I'm in the middle of reworking the PE a bit...
These are the new "rules" that will take effect as of 2.0.8 (feedback welcome):
* Collocation constraints are no longer bi-directional
* Collocation constraints have a numerical weight (between +/-
INFINITY) which is also used to implement weak collocation.
* If r1 is collocated with r2, then r2 is allocated first
* If r1 is collocated with r2 and r1.priority >= r2.priority, then
r1's node scores are adjusted according to the following formula:
r1.score[node] += r2.score[node] * collocation.score / INFINITY
(At the moment, everything except the score adjustment is implemented.)
A group is therefore just a special case of this. It's made up of a
number of resources and mandatory collocation constraints
(collocation.score == INFINITY), then it should come out as:
g1.score[node] = sum(resource[].score[node])
Collocating (score=5000) r3 (score_nodeX=100, priority=10) with g1
(combined score_nodeX=200, priority=1) then at the point we allocate
the contents of g1:
g1.score[nodeX] = 200 + (100*5000)/10000
= 250
Later, when we came to allocate r3
r3.score[nodeX] = 100+5000
If the priorities were reversed, then at the point we allocate the
contents of g1:
r3.score[nodeX] = 200
>
> Meanwhile I'll fix the cib and asap I'll update to latest 2.0.7
>
>
> Thank for your help,
> Roberto
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
More information about the Linux-HA
mailing list