[ClusterLabs] Preferred location is sometimes ignored

Ken Gaillot kgaillot at redhat.com
Fri Sep 16 12:08:37 EDT 2016


On 09/16/2016 10:59 AM, Auer, Jens wrote:
> On 09/16/2016 09:45 AM, Auer, Jens wrote:
>>> Hi,
>>>
>>> MDA1PFP-S01 14:41:35 1805 0 ~ # pcs constraint --full
>>> Location Constraints:
>>>   Resource: mda-ip
>>>     Enabled on: MDA1PFP-PCS01 (score:50)
>>> (id:location-mda-ip-MDA1PFP-PCS01-50)
>>>     Constraint: location-mda-ip
>>>       Rule: score=-INFINITY boolean-op=or  (id:location-mda-ip-rule)
>>>         Expression: pingd lt 1  (id:location-mda-ip-rule-expr)
>>>         Expression: not_defined pingd  (id:location-mda-ip-rule-expr-1)
>> If I'm reading this right, you have two separate location constraints
>> for mda-ip, a positive preference for one particular node (score 50 for
>> MDA1PFP-PCS01), and a -INFINITY preference whenever the ping attribute
> i>s bad.
> 
> Yes, I have two location constraints. The first one is a preferred location for startup and the second one should move the resource if ping fails. When I start the nodes for the test the ping should not fail as everything is ok. So the location preference should be the only score taken into account. So I am wondering why the resource is sometimes not started on the preferred node. 
> 
>>> Which constraint is sometimes ignored?
> The location constraint of 50 for node MDA1PFP-PCS01.

One possibility I see is: pingd happens to set the attribute for the
other node first; the cluster sees pingd not defined on the preferred
node, and so the -INFINITY overrides the +50, and it starts the IP on
the other node; and (I'm guessing) you have stickiness > 50 that keeps
the IP there even after pingd sets the attribute for the preferred node.

To avoid guessing :) look in the pacemaker detail log on the DC. The DC
will be the node with the most "pengine:" messages around that time.
You'll see messages like "Assigning (node) to (resource)" and various
results of actions and so forth, that might give some insight.

>>> Is there a way to get more debugging output from pcs, e.g. what
>>> triggered actions, which scores are computed and from which values?
> 
>> Not from pcs, but there are some lower-level tools that can sometimes be
>> helpful. "crm_simulate -sL" will show all the scores that went into the
>> current placement.
> 
> Thanks for the tip. Is there any way to get more output when starting the cluster up initially? This is only problem I am concerned here because afterwards it works fine.

I don't think so, the logs are the best alternative.

> Cheers,
>   Jens
> 





More information about the Users mailing list