[ClusterLabs] Preferred location is sometimes ignored

Auer, Jens jens.auer at cgi.com
Fri Sep 16 11:59:24 EDT 2016


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.

>> 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.

Cheers,
  Jens



More information about the Users mailing list