[Pacemaker] Dependency Trees

Jake Smith jsmith at argotec.com
Mon Feb 25 16:03:54 UTC 2013




----- Original Message -----
> From: "Donald Stahl" <don at blacksun.org>
> To: "The Pacemaker cluster resource manager" <pacemaker at oss.clusterlabs.org>
> Sent: Monday, February 25, 2013 10:52:47 AM
> Subject: Re: [Pacemaker] Dependency Trees
> 
> > Bad? Choice? What is there for crmsh to choose? This is what is
> > produced:
> >
> >       <rsc_colocation id="s1" score="INFINITY">
> >         <resource_set id="s1-0" sequential="false">
> >           <resource_ref id="d1"/>
> >           <resource_ref id="d2"/>
> >         </resource_set>
> >       </rsc_colocation>
> It does produces the XML above (and which I expected it to produce).
> Unfortunately- that XML doesn't do what I want it to do (it actually
> seems to have no effect at all).
> 
> > Whether that makes sense is another matter.
> There does not seem to be any way to say "I want these resources to
> all be on the same node" but with absolutely no dependencies.
> 
> This:
> 
> colocation myset inf: app1 app2
> 
> Creates a dependency, implied or otherwise, such that if the second
> service can't run, the first won't either. The problem is that even
> if
> they are both running, and I decide to stop the second service for
> maintenance reasons, then the first stops as well.
> 
> A perfect example is an Oracle Database and listener. They are
> independent services that can be stopped and started independently-
> but if they are both running- then they need to be running on the
> same
> host. I can find no way to express this in pacemaker. (Well- creating
> a group with meta ordered="false" collocated="false" would do it, but
> since you can't have groups of groups- you can't create a dependency
> tree with multiple such resources).
> 
> Now if the Listener and the Database both have the same dependent
> services, then yes- they also have to be colocated. But that is an
> implied colocation rather than an explicit one. I need to do some
> more
> testing before I can determine how pacemaker behaves under these
> conditions as I try to migrate resources.
> 

A little roundabout but you could create a dummy resource and make all the resource colocate with it.  Then as long as you don't stop the dummy each of the other resources could stop/start independent of each other i.e.:

colocation myset inf: ( app1 app2 app3 app4 ) dummy_res_for_colo_only_1

apps 1-4 will follow dummy if it moves to the other node and none of the apps are dependent upon each other.

HTH

Jake




More information about the Pacemaker mailing list