[Pacemaker] Constraints are driving me nuts! Need help.

Mrugesh Karnik mrugeshkarnik at gmail.com
Sat May 30 14:24:14 EDT 2009


Hi,

I have a scenario as follows:

Four master-slave resources
One group
Four primitives

I need to set the constraints to accommodate the following:

* The ms resources are not interdependent, but the master must be colocated to 
the same node. I figure this can be achieved with the following:
<rsc_colocation id="rc-master">
  <resource_set id="rc-rs-masters" sequential="false" role="Master">
    <resource_ref id="ms1"/>
    <resource_ref id="ms1"/>
    <resource_ref id="ms1"/>
    <resource_ref id="ms1"/>
  </resource_set>
</rsc_colocation>

* The primitives must only be started upon the node that the group is already 
started upon.

* There's basically one primitive for each master. There's a direct one-to-one 
relationship between the primitive and the master and the primitive must be 
started only after its corresponding master has started.

* The group itself must be started upon the node upon which the masters are to 
be.

* The group does not depend upon the master in terms of ordering.

Now, I've tried a lot of different constraint combinations together, but the 
following test criterion always fails:

* Start clean, with all resources' target-role set to stopped and empty 
constraints section.
* Add the constraints.
* Start one of the primitives.

What should happen is that the primitive shouldn't be started because the 
master it depends upon and the group are both off. Basically both the master 
and the group need to be active on the same node for the primitive to run on 
that node.

Under all the various constraints I tried, pacemaker still tries to start the 
primitive.

Please suggest me what the strategy for setting the constraints should be. I 
have all the combinations I've tried in SVN, along with the specific debug logs 
for a couple of them. I'll share them if needed.

There's only one scenario I haven't tried, which is to mix the resource_set 
type constraints with the normal ones. I'll try it tomorrow.

Thanks,
Mrugesh




More information about the Pacemaker mailing list