<div dir="ltr">Team, Good Morning/Good Evening<div><br></div><div>Related to yesterday's thread, proceeded with bundle setup, with 2 cluster nodes, </div><div>Executed the command , </div><div><pre style="font-family:Menlo,Consolas,Monaco,"Noto Mono","Nimbus Mono L",monospace;font-size:14.6667px;color:rgb(0,0,0);background-color:rgb(248,249,250);border:1px solid rgb(200,204,209);padding:1em;white-space:pre-wrap;overflow:auto"># cibadmin --modify --allow-create --scope resources -X '<bundle id="httpd-bundle">
  <</pre></div><div>docker containers didn't spin up, pcs status has a few failed resource actions , Please let me know in case I missed any steps</div><div><br></div><div>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.</div><div><br></div><div>Should I change anything i.e content between the Location tags?</div><div><pre style="font-family:Menlo,Consolas,Monaco,"Noto Mono","Nimbus Mono L",monospace;font-size:14.6667px;color:rgb(0,0,0);background-color:rgb(248,249,250);border:1px solid rgb(200,204,209);padding:1em;white-space:pre-wrap;overflow:auto">cat <<-END >/var/local/containers/status.conf
<b> <Location /server-status>
    SetHandler server-status
    Require local
 </Location></b>
END</pre></div><div>required docker images exists</div><div><br></div><div>Please find the attached screenshots </div><div><br></div><div>regards</div><div>Sridhar</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 8 Jun 2022 at 23:10, Sridhar K <<a href="mailto:sriatk@gmail.com">sriatk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Got it, Ken, Thanks a lot for the timely help, proceeded with the setup, will complete and test the HA part<div><br></div><div>Thank you all once again, :)</div><div>Good Day!!</div><div><br></div><div>regards</div><div>Sridhar</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 8 Jun 2022 at 21:19, Ken Gaillot <<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 2022-06-08 at 20:28 +0530, Sridhar K wrote:<br>
> Thanks a lot, Ken,Andrie for the time and guidance it was really<br>
> helpful. <br>
> <br>
> will proceed with the below approach<br>
> <br>
> [A preferred setup would be to run corosync and pacemaker on the VMs,<br>
> and configure bundles for the db containers.] <br>
> <br>
> I will try to get comfortable with bundle approach , referring <br>
> <a href="https://wiki.clusterlabs.org/wiki/Bundle_Walk-Through" rel="noreferrer" target="_blank">https://wiki.clusterlabs.org/wiki/Bundle_Walk-Through</a><br>
> <br>
> In above link, it's said at the start [Configure a test cluster of at<br>
> least two cluster nodes with Pacemaker 1.1.17 or later]<br>
> but in the section <br>
> Configure the cluster<br>
>  Our example needs the run-command option only because we are running<br>
> Pacemaker 1.1 inside the container:<br>
> <br>
> In short, we have a pacemaker cluster with 2 nodes(i,e full stack<br>
> pacemaker installed) and a bundle that has a  docker/podman image the<br>
> image has only pacemaker-remote installed in it.<br>
> i,e Line<br>
> RUN yum install -y httpd bind-utils curl lsof wget which pacemaker<br>
> pacemaker-remote resource-agents<br>
> Is my understanding correct, or in the image built we have a full-<br>
> stack pacemaker as well. <br>
<br>
You at least need the pacemaker-cli package as well.<br>
<br>
The container will only run pacemaker-remoted, but it's worthwhile to<br>
install the full pacemaker package because it has ancillary files that<br>
are useful.<br>
<br>
(In the just-released 2.1.3 version, the crm_attribute tool is now in<br>
the pacemaker-cli package, so that is not as big a deal anymore.)<br>
<br>
> <br>
> In case of any other links w.r.t usage of bundle/examples, Please<br>
> share the same.<br>
<br>
The walk-through is a good start. For fuller details, see:<br>
<br>
<a href="https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/singlehtml/index.html#bundles-containerized-resources" rel="noreferrer" target="_blank">https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/singlehtml/index.html#bundles-containerized-resources</a><br>
<br>
> <br>
> Regards<br>
> Sridhar<br>
> <br>
> <br>
> On Wed, 8 Jun 2022 at 19:46, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com" target="_blank">arvidjaar@gmail.com</a>><br>
> wrote:<br>
> > On 08.06.2022 17:01, Ken Gaillot wrote:<br>
> > > On Wed, 2022-06-08 at 18:31 +0530, Sridhar K wrote:<br>
> > >> Hi Team,<br>
> > >><br>
> > >> Required guidance w.r.t below problem statement<br>
> > >><br>
> > >> Need to have a HA setup for SQLServer running as a docker<br>
> > container<br>
> > >> and HA managed by the Pacemaker which is running as a separate<br>
> > docker<br>
> > >> container.<br>
> > >><br>
> > >> I have done a setup where pacemaker and SQL Server are running<br>
> > as a<br>
> > >> single docker container, able to achieve HA.<br>
> > >><br>
> > >> How to achieve the same when Pacemaker , and Sqlserver are<br>
> > running in<br>
> > >> different containers.<br>
> > > <br>
> > > I suspect it's not feasible.<br>
> > > <br>
> > > At a minimum, the Pacemaker container needs to run corosync as<br>
> > well as<br>
> > > pacemaker (implying a custom pid 1 script that starts both) and<br>
> > needs<br>
> > > to be privileged. I'm not sure corosync has been successfully<br>
> > > containerized before.<br>
> > > <br>
> > > Bundles won't work because they can only run on Pacemaker nodes.<br>
> > > <br>
> > > The db container could be configured as a remote node, basically<br>
> > > reproducing how a bundle is created internally. The db container<br>
> > would<br>
> > > be configured with pacemaker-remoted as its pid 1, and an IP<br>
> > given to<br>
> > > it that both pacemaker containers can reach. Launching all the<br>
> > > containers would need to be done by the OS at boot or manually.<br>
> > > <br>
> > > An ocf:pacemaker:remote resource would be configured in the<br>
> > cluster to<br>
> > > allow the pacemaker containers to manage the db via pacemaker-<br>
> > remoted<br>
> > > in the db containers.<br>
> > > <br>
> > > A custom fence agent would be needed to allow a pacemaker<br>
> > container to<br>
> > > ask the VM to reboot (kill and relaunch) any other container.<br>
> > Each VM<br>
> > <br>
> > Actually there is fence_docker which should work in this case.<br>
> > <br>
> > > and VM host would become a single point of failure unless a<br>
> > pacemaker<br>
> > > container could fence the VM and then the host as fallback fence<br>
> > > mechanisms in a topology.<br>
> > > <br>
> > > E.g. try to fence the container -> if that fails, try to fence<br>
> > the VM<br>
> > > -> if that fails, try to fence the host. Without all of that<br>
> > working,<br>
> > > something becomes a single point of failure.<br>
> > > <br>
> > > A preferred setup would be to run corosync and pacemaker on the<br>
> > VMs,<br>
> > > and configure bundles for the db containers.<br>
> > > <br>
> > >><br>
> > >> Checked remote node,bundle  concepts in Pacemaker unable to make<br>
> > HA<br>
> > >> setup work.<br>
> > >><br>
> > >> Please let me know whether the above scenario can be handled,<br>
> > any<br>
> > >> links, examples would be of great help.<br>
> > >><br>
> > >> Attaching a picture that depicts the scenario.<br>
> > >><br>
> > >> Please do the needful, Thank you<br>
> > >><br>
> > >> Regards<br>
> > >> Sridhar<br>
> > > <br>
> > <br>
> > _______________________________________________<br>
> > Manage your subscription:<br>
> > <a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
> > <br>
> > ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
> <br>
> _______________________________________________<br>
> Manage your subscription:<br>
> <a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
> <br>
> ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
-- <br>
Ken Gaillot <<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>><br>
<br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
</blockquote></div>
</blockquote></div>