[ClusterLabs] Colocation constraint for grouping all master-mode stateful resources with important stateless resources

Andrei Borzenkov arvidjaar at gmail.com
Sun Mar 25 07:06:10 EDT 2018

25.03.2018 10:21, Alberto Mijares пишет:
> On Sat, Mar 24, 2018 at 2:16 PM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>> 23.03.2018 20:42, Sam Gardner пишет:
>>> Thanks, Ken.
>>> I just want all master-mode resources to be running wherever DRBDFS is running (essentially). If the cluster detects that any of the master-mode resources can't run on the current node (but can run on the other per ethmon), all other master-mode resources as well as DRBDFS should move over to the other node.
>>> The current set of constraints I have will let DRBDFS move to the standby node and "take" the Master mode resources with it, but the Master mode resources failing over to the other node won't take the other Master resources or DRBDFS.
>> I do not think it is possible. There is no way to express symmetrical
>> colocation rule like "always run A and B together". You start with A and
>> place B relative to A; but then A is not affected by B's state.
>> Attempting now to place A relative to B will result in a loop and is
>> ignored. See also old discussion:
> It is possible. Check this thread
> https://lists.clusterlabs.org/pipermail/users/2017-November/006788.html

I do not see how it answers the question. It explains how to use other
criteria than node name for colocating resources, but it does not change
basic fact that colocating is asymmetrical. Actually this thread
explicitly suggests "Pick one resource as your base resource that
everything else should go along with".

If you you actually have configuration that somehow implements
symmetrical colocation between resources, I would appreciate if you
could post your configuration.

Regarding the original problem, the root cause is slightly different though.

@Sam, the behavior you describe is correct for your constraints that you
show. When colocating with resource set, all resources in the set must
be active on the same node. It means that in your case of

	<resource_set id="pcs_rsc_set_drbdfs" sequential="false">
	  <resource_ref id="drbdfs"/>
role="Master" sequential="false">
	  <resource_ref id="drbd.master"/>
	  <resource_ref id="inside-interface-sameip.master"/>
	  <resource_ref id="outside-interface-sameip.master"/>

if one IP resource (master) is moved to another node, dependent resource
(drbdfs) simply cannot run anywhere.

Before discussing low level pacemaker implementation you really need to
have high level model of resources relationship. On one hand you
apparently intend to always run everything on the same node - on the
other hand you have two rules that independently decide where to place
two resources. That does not fit together.

More information about the Users mailing list