[Linux-HA] about the resource stickiness

TORRESANI, Roberto roberto.torresani at unitn.it
Fri Oct 6 12:03:42 MDT 2006


Well...I tried ptest and, really, after some -V it puts out some very interesting information. ;-)
The only thing that remains obscure to me is how the colocation constraints are involved in the
node's score calculation.
Having:
- heartbeat 2.0.7
- a 1st resgroup (mysql) made of 2 res
- a 2nd resgroup (apache) made of 4 res
- a colocation constraint between them
- resource_stickiness=50
- resource_failure_stickiness=-100
the total score shown by ptest is 1900 (I suppose it would be 1900/2=950 with the patch), so:
 
mysql: 50 x 2 = 100
apache: 50 x 4 = 200
mysql + apache = 300
...and the rest of the score?
How is it calculated?
 
I'm sorry, I can't include the CIB in this moment (I'm at home), but I attach the interesting part of ptest output.
 
Regards,
Roberto
-------------- next part --------------
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: stage3:allocate.c Coloring resources
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: invert_constraint:utils.c Inverting constraint
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: group_color:group.c Coloring children of: mysql_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: group_color:group.c Pre-Processing constraints:colocation:apache_grp-mysql_grp for mysql_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between mysql_grp:fs and apache_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: group_rsc_colocation_rh:group.c Processing RH of constraint constraints:colocation:apache_grp-mysql_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: LHSmysql_grp:fs        (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating mysql_grp:fs with apache_grp:ip (constraints:colocation:apache_grp-mysql_grp)
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_rsc_colocation_rh:native.c Priority update
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating mysql_grp:fs with apache_grp:ip. Update LHS: false, Update RHS: false
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: Coloring: mysql_grp:fs (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Pre-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between mysql_grp:fs and mysql_grp:mysql
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating mysql_grp:fs with mysql_grp:mysql (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_rsc_colocation_rh:native.c Priority update
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating mysql_grp:fs with mysql_grp:mysql. Update LHS: false, Update RHS: false
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_choose_color:native.c Choose a color from 0 possibilities
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: Filtering nodes for: mysql_grp:fs      (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 50
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource mysql_grp:fs with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Colored resource mysql_grp:fs with new color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Post-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between mysql_grp:fs and mysql_grp:mysql
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating mysql_grp:fs with mysql_grp:mysql (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating mysql_grp:fs with mysql_grp:mysql. Update LHS: false, Update RHS: true
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 100
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 100
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource mysql_grp:mysql with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: Colored mysql_grp:fs   (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource mysql_grp with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: Coloring: mysql_grp:mysql      (lsb:mysqld):   Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource mysql_grp with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: invert_constraint:utils.c Inverting constraint
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: invert_constraint:utils.c Inverting constraint
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: invert_constraint:utils.c Inverting constraint
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: group_color:group.c Coloring children of: apache_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: group_color:group.c Pre-Processing constraints:colocation:apache_grp-mysql_grp for apache_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:ip and mysql_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: group_rsc_colocation_rh:group.c Processing RH of constraint constraints:colocation:apache_grp-mysql_grp
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: LHSapache_grp:ip       (heartbeat::ocf:IPaddr):        Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:ip with mysql_grp:fs (constraints:colocation:apache_grp-mysql_grp)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:ip with mysql_grp:fs. Update LHS: true, Update RHS: false
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 150
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 150
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:ip with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: Coloring: apache_grp:ip        (heartbeat::ocf:IPaddr):        Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: Coloring: apache_grp:fs        (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Pre-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:fs and apache_grp:ip
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:fs with apache_grp:ip (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:fs with apache_grp:ip. Update LHS: true, Update RHS: false
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 200
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 200
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:fs with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Colored resource apache_grp:fs with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Post-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:fs and apache_grp:ip
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:fs with apache_grp:ip (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:fs with apache_grp:ip. Update LHS: false, Update RHS: true
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 400
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 250
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:ip with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: Colored apache_grp:fs  (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: Coloring: apache_grp:fslogs    (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Pre-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:fslogs and apache_grp:ip
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:fslogs with apache_grp:ip (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:fslogs with apache_grp:ip. Update LHS: true, Update RHS: false
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 450
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 450
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:fslogs with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Colored resource apache_grp:fslogs with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Post-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:fslogs and apache_grp:ip
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:fslogs with apache_grp:ip (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:fslogs with apache_grp:ip. Update LHS: false, Update RHS: true
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 900
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 500
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:ip with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: Colored apache_grp:fslogs      (heartbeat::ocf:Filesystem):    Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: Coloring: apache_grp:apache    (heartbeat::ocf:apache):        Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Pre-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:apache and apache_grp:ip
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:apache with apache_grp:ip (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:apache with apache_grp:ip. Update LHS: true, Update RHS: false
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 950
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 950
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:apache with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Colored resource apache_grp:apache with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_color:native.c Post-Processing group:internal_colocation
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_lh:native.c Processing colocation constraint between apache_grp:apache and apache_grp:ip
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh:native.c Colocating apache_grp:apache with apache_grp:ip (group:internal_colocation)
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_rsc_colocation_rh_must:native.c Colocating apache_grp:apache with apache_grp:ip. Update LHS: false, Update RHS: true
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 1900
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: native_assign_color:native.c Created intersection for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for marcos.unitn.it: 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: node_list_and:utils.c New node weight for ernesto.unitn.it: 1000
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp:ip with color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: Colored apache_grp:apache      (heartbeat::ocf:apache):        Started ernesto.unitn.it
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: native_assign_color:native.c Colored resource apache_grp with color 1

[snip]

ptest[18547]: 2006/10/06_16:35:29 debug: debug3: stage4:allocate.c Assigning nodes to colors
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: choose_node_from_list:allocate.c Choosing node for color 0
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: choose_node_from_list:allocate.c Choosing node for color 1
ptest[18547]: 2006/10/06_16:35:29 debug: debug3: sort_node_weight:utils.c marcos.unitn.it (0) < ernesto.unitn.it (1900) : weight
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: choose_node_from_list:allocate.c Color 1, Node[0] ernesto.unitn.it: 1900
ptest[18547]: 2006/10/06_16:35:29 debug: debug2: choose_node_from_list:allocate.c Color 1, Node[1] marcos.unitn.it: 0


More information about the Linux-HA mailing list