[Pacemaker] Clone resource as a dependency

Jake Smith jsmith at argotec.com
Thu Dec 20 21:20:01 UTC 2012


----- Original Message -----

> From: "Attila Megyeri" <amegyeri at minerva-soft.com>
> To: "The Pacemaker cluster resource manager"
> <pacemaker at oss.clusterlabs.org>
> Sent: Thursday, December 20, 2012 3:07:06 PM
> Subject: Re: [Pacemaker] Clone resource as a dependency

> Thanks Jake,

> I did not try with the collocation constraint as the clone was
> running on all nodes, but I will give it a try – n ot sure whether
> this would work with a clone.

If you setup the collocation so apache depends upon the fs then the fs can run anywhere but apache can only run where fs is. I think that will take care of it for you. 

> I am using pacemaker 1.1.6 on a debian system, the critical RAs are
> from latest github. The cluster is assymetric.

> The config itself is quite big so I wouldn’t paste it here, but the
> basic requirement is very simple:

> - Primitive “fs” (filesystem)
> - Clone of “fs” with clone-max=4. It shall run on 4 of the 7 nodes.
> - primitive apache, which is allowed to run on 2 of 7 nodes, but in
> one instance only
> - property $id="cib-bootstrap-options" \
> - dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
> - cluster-infrastructure="openais" \
> - expected-quorum-votes="7" \
> - stonith-enabled="false" \
> - no-quorum-policy="stop" \
> - start-failure-is-fatal="false" \
> - stonith-action="reboot" \
> - symmetric-cluster="false" \
> - last-lrm-refresh="1355960642"
> -

> The goal is to make sure that apache runs only if a FS clone is
> running on that node as well. At the same time, the FS clone must
> run on all 4 nodes.

> Thanks,
> Attila

> From: Jake Smith [mailto:jsmith at argotec.com]
> Sent: Thursday, December 20, 2012 8:37 PM
> To: The Pacemaker cluster resource manager
> Subject: Re: [Pacemaker] Clone resource as a dependency

> A collocation constraint as well as the order so it must run on the
> same node as a running clone might do it. Not quite sure with the
> clone though.

> Doc reference would require some more info such as what version of
> pacemaker, etc.

> Including configuration helps get answers quicker.

> HTH

> Jake

> ----- Original Message -----

> From: "Attila Megyeri" < amegyeri at minerva-soft.com >
> To: "The Pacemaker cluster resource manager" <
> pacemaker at oss.clusterlabs.org >
> Sent: Thursday, December 20, 2012 1:23:07 PM
> Subject: Re: [Pacemaker] Clone resource as a dependency
> Is this so difficult or so trivial, that no one responded? J

> I would appreciate a reference to some documentation as well.

> Thank you,
> Attila

> From: Attila Megyeri [ mailto:amegyeri at minerva-soft.com ]
> Sent: Wednesday, December 19, 2012 10:05 AM
> To: The Pacemaker cluster resource manager
> Subject: [Pacemaker] Clone resource as a dependency

> Hi,

> How can I configure a resource (e.g. an apache) to depend on the
> start of a clone resource (e.g. a filesystem resource) for the given
> node?
> I know how to arrange a primitive into a group, but in this
> particular case, the primitive must run on the passive node as well
> (performing some async offline operations), but apache may run only
> if the clone is started on the node where apache is about to start.

> I tried by defining the clone resource and then by adding a mandatory
> order where apache depends on the filesystem resource, but apache
> keeps on running even if the filesystem runs only on a different
> node (stopped on the apache node).

> BTW, the filesystem is glusterfs.

> Thank you in advance!

> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

> Project Home: http://www.clusterlabs.org
> Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker

> Project Home: http://www.clusterlabs.org
> Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20121220/aacef5b4/attachment.htm>


More information about the Pacemaker mailing list