[Pacemaker] Starting a cloned resource only on nodes running another resource
Ashley Winters
Ashley.Winters at freedomvoice.com
Wed Nov 18 21:50:20 UTC 2009
Andrew Beekhof wrote,
>
> On Wed, Nov 18, 2009 at 12:11 AM, Ashley Winters
> <Ashley.Winters at freedomvoice.com> wrote:
> > I want to start a single instance of resource A on any node which is
> > running one or more instances of resource B. And, I don't want to stop
> > resource A until there are no more instances of resource B on that
> > node. I'm using pacemaker 1.0.5 & openais 0.80.5.
>
> You might find the following link useful.
> http://clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-resource-sets-collocation.html
That was tantalizingly close to the solution I needed, but the colocation
constraint over a resource_set won't distribute over my cloned resource.
<constraints>
<rsc_colocation id="colo-route" score="INFINITY">
<resource_set id="set-route" sequential="true">
<resource_ref id="cl-route"/>
</resource_set>
<resource_set id="set-route-ip" sequential="false">
<resource_ref id="ip1"/>
<resource_ref id="ip2"/>
</resource_set>
</rsc_colocation>
</constraints>
Experimentally, that constraint only allows cl-route to run on a node with
both resources running on it, rather than on any node where one of them
is running. Setting up two different colocation constraints with one ip
each doesn't change the behavior. In either case, both resources *have*
to be running, and both on the same node, before the cl-route will be
started.
The documentation I read mentioned a possible configuration where "B would
be allowed to remain active even if A or C (or both) were inactive" but
apparently sequential="false" didn't trigger it.
Is there a way to convince pacemaker to run the colocation test
independently for each node & ip resource? Something like an 'or'?
Thanks,
- Ashley Winters
More information about the Pacemaker
mailing list