[Pacemaker] Dependency Trees

Donald Stahl don at blacksun.org
Thu Feb 21 14:24:59 EST 2013


> I think you may have missed a key piece - Sets.  Requires more than 2 and assumes at least one will be sequential.

Not exactly. That may have been a poor example but what I was trying
to achieve was the idea that these 2 services must run on the same
host, but that neither one had to be running, or placed, first.

For example- if I create the following:

colocation OraLsnr03 inf: OraData3 OraBin3 OraIP3

# crm_mon -r --one-shot
 OraData3       (ocf::heartbeat:Filesystem):    Started Host-A
 OraBin3        (ocf::heartbeat:Filesystem):    Started Host-A
 OraIP3 (ocf::heartbeat:IPaddr2):       Started Host-A

All three services are running. But now- if I shut down OraData3:

# crm resource stop OraData3
# crm_mon -r --one-shot
 OraData3       (ocf::heartbeat:Filesystem):    Stopped
 OraBin3        (ocf::heartbeat:Filesystem):    Stopped
 OraIP3 (ocf::heartbeat:IPaddr2):       Stopped

All three services are shut down. If I start OraData3- then all three
resources start back up.

That was not the behavior I needed because there is a sort of implied order.

What I needed to do was put them in ()'s which sets sequential=false in the XML.

When I do that- I can stop and start individual services without
affecting the other ones.

In short- I needed to be able to say:

These three services must always run on the same host- but not
necessarily started.

Or perhaps more accurately- If any one of these services is running on
a host- then the other related services must either be running on the
same host _or_ not running at all.

colocation OraLsnr03 inf: \( OraData3 OraBin3 OraIP3 \)

Creates the behavior I have just described.

colocation OraLsnr03 inf: OraData3 OraBin3 OraIP3

Creates the dependency and ordering behavior I did not want.

> Here might explain better - have a look at the "Unversioned Docs" at 'General Concepts' - ordering explained and colocation explained.  Well into each of the documents they talk about sequential/non-sequential:
>
> http://clusterlabs.org/doc/
I will give this a more thorough read but I believe I finally have my
head straight.

Thanks for all of the insight.
-Don




More information about the Pacemaker mailing list