[ClusterLabs] Surprising semantics of location constraints with INFINITY score

Kristoffer Grönlund kgronlund at suse.com
Tue Apr 11 09:30:27 EDT 2017


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?

-- 
// Kristoffer Grönlund
// kgronlund at suse.com




More information about the Users mailing list