[ClusterLabs] Surprising semantics of location constraints with INFINITY score

Ken Gaillot kgaillot at redhat.com
Tue Apr 11 09:43:09 EDT 2017

On 04/11/2017 08:30 AM, Kristoffer Grönlund wrote:
> Hi all,
> I discovered today that a location constraint with score=INFINITY
> doesn't actually restrict resources to running only on particular
> nodes. From what I can tell, the constraint assigns the score to that
> node, but doesn't change scores assigned to other nodes. So if the node
> in question happens to be offline, the resource will be started on any
> other node.
> Example:
> <rsc_location id="dummy-on-node2" rsc="dummy" score="INFINITY" node="node2"/>
> If node2 is offline, I see the following:
>  dummy	(ocf::heartbeat:Dummy):	Started node1
> native_color: dummy allocation score on node1: 1
> native_color: dummy allocation score on node2: -INFINITY
> native_color: dummy allocation score on webui: 0
> It makes some kind of sense, but seems surprising - and the
> documentation is a bit unclear on the topic. In particular, the
> statement that a score = INFINITY means "must" is clearly not correct in
> this case. Maybe the documentation should be clarified for location
> constraints?

Yes, that behavior is intended. I'll make a note to clarify in the

More information about the Users mailing list