[ClusterLabs] About globally unique resource instances distribution per node

Daniel Hernández danyboy1104 at gmail.com
Tue Dec 29 10:21:13 EST 2015

Good day, I work at Datys Soluciones Tecnológicas, we use Corosync and
Pacemaker in production to run a service infrastructure since 3 years
ago. Versions
used are Centos 6.3, corosync 1.4.1 and pacemaker 1.1.7. We have a web
server, gearman
job manager, and globally unique resource clones as gearman workers to
balance the load distributed by gearman. My question is if there exist
a way or a workaround to configure globally unique resource clone
number of instances to start per node. As example: Say have 3 nodes:
node1, node2 and node3, and a globally unique resource clone of 6
instances with name clone_example and want to start 1 instance on
node1, 2 instances on node2 and 3 instances on node3, as the following
example shows.

Clone Set: clone_example [example] (unique)
         example:0 (ocf:heartbeat:example): Started nodo3
         example:1 (ocf:heartbeat:example): Started nodo2
         example:2 (ocf:heartbeat:example): Started nodo2
         example:3 (ocf:heartbeat:example): Started nodo1
         example:4 (ocf:heartbeat:example): Started nodo3
         example:5 (ocf:heartbeat:example): Started nodo3

The reason we want to configure the resource this way is because one
resource clone instance consume one node cpu, and the nodes have
different number of cpu:
node1 = 1cpu, node2 = 2cpu, node3 = 3cpu in the example.

I read Pacemaker Cluster from Scratch and Cluster Configuration
Explained to find a way and see Chapter 11. Utilization and Placement
Strategy. I make a test with clones and resources but the clones where
not distributed as I expected and some instances were not started, I
used the 3 placement-strategies and similar behaviour. I know the
cluster use a
best effort algorithm to distribute the resources when this option is
used, and maybe that's the reason, so I am searching for a way to do
it. I browse the mailing list archives to see if there exist a similar
post on this topic and couldn't find it, maybe I miss it. Any response
will be appreciated.
Thanks for your time

More information about the Users mailing list