[ClusterLabs] Q: native_color scores for clones

Ken Gaillot kgaillot at redhat.com
Thu Aug 30 15:35:47 UTC 2018


On Thu, 2018-08-30 at 12:23 +0200, Ulrich Windl wrote:
> Hi!
> 
> After having found showscores.sh, I thought I can improve the
> perfomance by porting it to Perl, but it seems the slow part actually
> is calling pacemakers helper scripts like crm_attribute,
> crm_failcount, etc...
> 
> But anyway: Being quite confident what my program produces (;-)), I
> found some odd score values for clones that run in a two node
> cluster. For example:
> 
> Resource               Node     Score Stickin. Fail Count Migr. Thr.
> ---------------------- ---- --------- -------- ---------- ----------
> prm_DLM:1              h02          1        0          0          0
> prm_DLM:1              h06          0        0          0          0
> prm_DLM:0              h02  -INFINITY        0          0          0
> prm_DLM:0              h06          1        0          0          0
> prm_O2CB:1             h02          1        0          0          0
> prm_O2CB:1             h06  -INFINITY        0          0          0
> prm_O2CB:0             h02  -INFINITY        0          0          0
> prm_O2CB:0             h06          1        0          0          0
> prm_cfs_locks:0        h02  -INFINITY        0          0          0
> prm_cfs_locks:0        h06          1        0          0          0
> prm_cfs_locks:1        h02          1        0          0          0
> prm_cfs_locks:1        h06  -INFINITY        0          0          0
> prm_s02_ctdb:0         h02  -INFINITY        0          0          0
> prm_s02_ctdb:0         h06          1        0          0          0
> prm_s02_ctdb:1         h02          1        0          0          0
> prm_s02_ctdb:1         h06  -INFINITY        0          0          0
> 
> For prm_DLM:1 for example one node has score 0, the other node has
> score 1, but for prm:DLM:0 the host that has 1 for prm_DLM:1 has
> -INFINITY (not 0), while the other host has the usual 1. So I guess
> that even without -INFINITY the configuration would be stable. For
> prm_O2CB two nodes have -INFINITY as score. For prm_cfs_locks the
> pattern is as usual, and for rpm_s02_ctdb to nodes have -INFINITY
> again.
> 
> I don't understand where those -INFINITY scores come from. Pacemaker
> is SLES11 SP4 (1.1.12-f47ea56).

Scores are something of a mystery without tracing through code line by
line. It's similar to (though much simpler than) AI in respect of the
cause of an output being obscured by the combination of so many inputs
and processing steps.

Resources (including clone instances) are placed one by one. My guess
is that prm_DLM:1 was placed first, on h02, which made it no longer
possible for any other instance to be placed on h02 due to clone-node-
max being 1 (which I'm assuming is the case here, the default). All
instances processed after that (which is only prm_DLM:0 in this case)
get -INFINITY on h02 for that reason.

The clones with mirrored -INFINITY scores likely had additional
processing due to constraints or whatnot.

> 
> It might also be a bug, because when I look at a three-node cluster,
> I see that a ":0" resource had score 1 once, and 0 twice, but the
> corrsponding ":2" resource has scores 0, 1, and -INFINITY, and the
> ":1" resource has score 1 once and -INFINITY twice.
> 
> When I look at the "clone_solor" scores, the prm_DLM:* primitives
> look as expected (no -INFINITY). However the cln_DLM clones have
> score like 10000, 8200 and 2200 (depending on the node).
> 
> Can someone explain, please?
> 
> Regards,
> Ulrich
-- 
Ken Gaillot <kgaillot at redhat.com>


More information about the Users mailing list