[ClusterLabs] spread out resources

Ken Gaillot kgaillot at redhat.com
Fri Apr 1 12:16:34 EDT 2016

On 03/30/2016 08:37 PM, Ferenc Wágner wrote:
> Hi,
> I've got a couple of resources (A, B, C, D, ... more than cluster nodes)
> that I want to spread out to different nodes as much as possible.  They
> are all the same, there's no distinguished one amongst them.  I tried
> <rsc_colocation id="cl-test-spread" score="-50">
>   <resource_set id="cl-test-spread-set" sequential="false">
>     <resource_ref id="A"/>
>     <resource_ref id="B"/>
>     <resource_ref id="C"/>
>     <resource_ref id="D"/>
>   </resource_set>
>   <resource_set id-ref="cl-test-spread-set"/>
> </rsc_colocation>
> But crm_simulate did not finish with the above in the CIB.
> What's a good way to get this working?

Per the docs, "A colocated set with sequential=false makes sense only if
there is another set in the constraint. Otherwise, the constraint has no
effect." Using sequential=false would allow another set to depend on all
these resources, without them depending on each other.

I haven't actually tried resource sets with negative scores, so I'm not
sure what happens there. With sequential=true, I'd guess that each
resource would avoid the resource listed before it, but not necessarily
any of the others.

By default, pacemaker does spread things out as evenly as possible, so I
don't think anything special is needed. If you want more control over
the assignment, you can look into placement strategies:


More information about the Users mailing list