[ClusterLabs] Required guidance w.r.t pacemaker

Ken Gaillot kgaillot at redhat.com
Wed Jun 8 10:01:39 EDT 2022

On Wed, 2022-06-08 at 18:31 +0530, Sridhar K wrote:
> Hi Team,
> Required guidance w.r.t below problem statement
> Need to have a HA setup for SQLServer running as a docker container
> and HA managed by the Pacemaker which is running as a separate docker
> container.
> I have done a setup where pacemaker and SQL Server are running as a
> single docker container, able to achieve HA.
> How to achieve the same when Pacemaker , and Sqlserver are running in
> different containers.

I suspect it's not feasible.

At a minimum, the Pacemaker container needs to run corosync as well as
pacemaker (implying a custom pid 1 script that starts both) and needs
to be privileged. I'm not sure corosync has been successfully
containerized before.

Bundles won't work because they can only run on Pacemaker nodes.

The db container could be configured as a remote node, basically
reproducing how a bundle is created internally. The db container would
be configured with pacemaker-remoted as its pid 1, and an IP given to
it that both pacemaker containers can reach. Launching all the
containers would need to be done by the OS at boot or manually.

An ocf:pacemaker:remote resource would be configured in the cluster to
allow the pacemaker containers to manage the db via pacemaker-remoted
in the db containers.

A custom fence agent would be needed to allow a pacemaker container to
ask the VM to reboot (kill and relaunch) any other container. Each VM
and VM host would become a single point of failure unless a pacemaker
container could fence the VM and then the host as fallback fence
mechanisms in a topology.

E.g. try to fence the container -> if that fails, try to fence the VM
-> if that fails, try to fence the host. Without all of that working,
something becomes a single point of failure.

A preferred setup would be to run corosync and pacemaker on the VMs,
and configure bundles for the db containers.

> Checked remote node,bundle  concepts in Pacemaker unable to make HA
> setup work.
> Please let me know whether the above scenario can be handled, any
> links, examples would be of great help.
> Attaching a picture that depicts the scenario.
> Please do the needful, Thank you
> Regards
> Sridhar

Ken Gaillot <kgaillot at redhat.com>

More information about the Users mailing list