[ClusterLabs] Resource dependencies

Ken Gaillot kgaillot at redhat.com
Mon Aug 3 10:37:13 EDT 2015


On 08/03/2015 06:02 AM, Milos Buncic wrote:
> Want you need is order constraint, more about this
> 
> http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-ordering.html
> On Aug 3, 2015 12:41, "Vijay Partha" <vijaysarathy94 at gmail.com> wrote:
> 
> Hi,
> 
> Is these possible to do in pacemaker and how can it be done?
> 
> 1)      Service dependency: that is if there are two programs, we should be
> able to define that Prog-B depends on Prog-A, and hence Pacemaker should
> start them in the correct order.

An order constraint as mentioned above is part of this. If, in addition,
the services should run on the same node, you need a separate colocation
constraint to specify that.

Alternatively, resource groups are a shorthand for doing both:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#group-resources

(Pacemaker Explained shows the low-level XML in order to explain the
concepts thoroughly, but generally you would use a high-level tool such
as crmsh or pcs to configure it. See their man pages for more info.)

>  2)      Boot time support: if a machine/cluster gets rebooted, Pacemaker
> should start the services required for that machine based on the
> ‘dependency’ order.

Yes, it will do this automatically once you set up the constraints/groups.

The services themselves should NOT be configured to start at boot via
the operating system (systemd, upstart, init.d, etc.). Pacemaker will
start and stop them.

Whether the OS starts pacemaker itself at boot is up to you. Some people
prefer that, so that everything is as automated as possible. But many
admins prefer to start pacemaker manually after booting, so that if the
node crashes, they can investigate before returning it to the cluster.







More information about the Users mailing list