[ClusterLabs] Required guidance w.r.t pacemaker
Sridhar K
sriatk at gmail.com
Thu Jun 9 12:22:53 EDT 2022
Team, Good Morning/Good Evening
Related to yesterday's thread, proceeded with bundle setup, with 2 cluster
nodes,
Executed the command ,
# cibadmin --modify --allow-create --scope resources -X '<bundle
id="httpd-bundle">
<
docker containers didn't spin up, pcs status has a few failed resource
actions , Please let me know in case I missed any steps
As command cibadmin didn't errored out and containers didn't spin retried
cibadmin command 2-3 times, that's the reason pcs is displaying 8 resource
instances configured.
Should I change anything i.e content between the Location tags?
cat <<-END >/var/local/containers/status.conf* <Location /server-status>
SetHandler server-status
Require local
</Location>*
END
required docker images exists
Please find the attached screenshots
regards
Sridhar
On Wed, 8 Jun 2022 at 23:10, Sridhar K <sriatk at gmail.com> wrote:
> Got it, Ken, Thanks a lot for the timely help, proceeded with the setup,
> will complete and test the HA part
>
> Thank you all once again, :)
> Good Day!!
>
> regards
> Sridhar
>
> On Wed, 8 Jun 2022 at 21:19, Ken Gaillot <kgaillot at redhat.com> wrote:
>
>> On Wed, 2022-06-08 at 20:28 +0530, Sridhar K wrote:
>> > Thanks a lot, Ken,Andrie for the time and guidance it was really
>> > helpful.
>> >
>> > will proceed with the below approach
>> >
>> > [A preferred setup would be to run corosync and pacemaker on the VMs,
>> > and configure bundles for the db containers.]
>> >
>> > I will try to get comfortable with bundle approach , referring
>> > https://wiki.clusterlabs.org/wiki/Bundle_Walk-Through
>> >
>> > In above link, it's said at the start [Configure a test cluster of at
>> > least two cluster nodes with Pacemaker 1.1.17 or later]
>> > but in the section
>> > Configure the cluster
>> > Our example needs the run-command option only because we are running
>> > Pacemaker 1.1 inside the container:
>> >
>> > In short, we have a pacemaker cluster with 2 nodes(i,e full stack
>> > pacemaker installed) and a bundle that has a docker/podman image the
>> > image has only pacemaker-remote installed in it.
>> > i,e Line
>> > RUN yum install -y httpd bind-utils curl lsof wget which pacemaker
>> > pacemaker-remote resource-agents
>> > Is my understanding correct, or in the image built we have a full-
>> > stack pacemaker as well.
>>
>> You at least need the pacemaker-cli package as well.
>>
>> The container will only run pacemaker-remoted, but it's worthwhile to
>> install the full pacemaker package because it has ancillary files that
>> are useful.
>>
>> (In the just-released 2.1.3 version, the crm_attribute tool is now in
>> the pacemaker-cli package, so that is not as big a deal anymore.)
>>
>> >
>> > In case of any other links w.r.t usage of bundle/examples, Please
>> > share the same.
>>
>> The walk-through is a good start. For fuller details, see:
>>
>>
>> https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/singlehtml/index.html#bundles-containerized-resources
>>
>> >
>> > Regards
>> > Sridhar
>> >
>> >
>> > On Wed, 8 Jun 2022 at 19:46, Andrei Borzenkov <arvidjaar at gmail.com>
>> > wrote:
>> > > On 08.06.2022 17:01, Ken Gaillot wrote:
>> > > > 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
>> > >
>> > > Actually there is fence_docker which should work in this case.
>> > >
>> > > > 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
>> > > >
>> > >
>> > > _______________________________________________
>> > > Manage your subscription:
>> > > https://lists.clusterlabs.org/mailman/listinfo/users
>> > >
>> > > ClusterLabs home: https://www.clusterlabs.org/
>> >
>> > _______________________________________________
>> > Manage your subscription:
>> > https://lists.clusterlabs.org/mailman/listinfo/users
>> >
>> > ClusterLabs home: https://www.clusterlabs.org/
>> --
>> Ken Gaillot <kgaillot at redhat.com>
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>>
>> ClusterLabs home: https://www.clusterlabs.org/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20220609/63d0e427/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: docker_images.jpg
Type: image/jpeg
Size: 58592 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20220609/63d0e427/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cibadmin.jpg
Type: image/jpeg
Size: 597501 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20220609/63d0e427/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcs_screenshot.jpg
Type: image/jpeg
Size: 431178 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20220609/63d0e427/attachment-0005.jpg>
More information about the Users
mailing list