[ClusterLabs] Antw: Surprising semantics of location constraints with INFINITY score
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Wed Apr 12 02:00:50 EDT 2017
>>> Kristoffer Grönlund <kgronlund at suse.com> schrieb am 11.04.2017 um 15:30 in
Nachricht <87lgr7kr64.fsf at suse.com>:
> 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.
This makes sense IMHO: Otherwise the resource would not run at all. Obviously
the infinity score for a node means: "Whenever this node is available, run the
resource there (other rules not forbidding)". If you want to run the resource
nowhere else, you'd add a -INFINITY score on the other nodes, I guess.
>
> 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
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
More information about the Users
mailing list