<div dir="ltr">Thanks a lot, Ken,Andrie for the time and guidance it was really helpful. <div><br></div><div>will proceed with the below approach</div><div><br></div><div><u><i>[A preferred setup would be to run corosync and pacemaker on the VMs,</i></u></div><div><u><i>and configure bundles for the db containers.] </i></u></div><div><u><i><br></i></u></div><div>I will try to get comfortable with bundle approach , referring </div><div><b><a href="https://wiki.clusterlabs.org/wiki/Bundle_Walk-Through">https://wiki.clusterlabs.org/wiki/Bundle_Walk-Through</a><br></b></div><div><br></div><div>In above link, it's said at the start [<i><span style="color:rgb(63,63,63);font-family:"Open Sans",sans-serif;font-size:14.6667px">Configure a test cluster of at least two cluster nodes with </span><a href="https://wiki.clusterlabs.org/wiki/Pacemaker-1.1.17" title="Pacemaker-1.1.17" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;text-decoration-line:none;color:rgb(51,102,204);font-family:"Open Sans",sans-serif;font-size:14.6667px">Pacemaker 1.1.17</a><span style="color:rgb(63,63,63);font-family:"Open Sans",sans-serif;font-size:14.6667px"> or later]</span></i></div><div><i><span style="color:rgb(63,63,63);font-family:"Open Sans",sans-serif;font-size:14.6667px">but in the section </span></i></div><h2 style="font-family:"Roboto Slab";line-height:1.125;margin:1.25em 0px 0.5em;font-size:1.8em;border-bottom:0px;font-variant-ligatures:no-common-ligatures no-discretionary-ligatures no-historical-ligatures no-contextual;font-variant-numeric:normal;font-variant-east-asian:normal;color:rgb(63,63,63)"><span class="gmail-mw-headline" id="gmail-Configure_the_cluster">Configure the cluster</span></h2><div><span class="gmail-mw-headline"><span style="color:rgb(63,63,63);font-family:"Open Sans",sans-serif;font-size:14.6667px"> Our example needs the </span><code 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:1px 4px">run-command</code><span style="color:rgb(63,63,63);font-family:"Open Sans",sans-serif;font-size:14.6667px"> option only because we are running Pacemaker 1.1 inside the container:</span><br></span></div><div><span class="gmail-mw-headline"><span style="color:rgb(63,63,63);font-family:"Open Sans",sans-serif;font-size:14.6667px"><br></span></span></div><div><font color="#3f3f3f" face="Open Sans, sans-serif"><span style="font-size:14.6667px">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.</span></font></div><div><font color="#3f3f3f" face="Open Sans, sans-serif"><span style="font-size:14.6667px">i,e Line</span></font></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">RUN yum install -y httpd bind-utils curl lsof wget which pacemaker pacemaker-remote resource-agents</pre></div><div><font color="#3f3f3f" face="Open Sans, sans-serif"><span style="font-size:14.6667px">Is my understanding correct, or in the image built we have a full-stack pacemaker as well. </span></font></div><div><br></div><div>In case of any other links w.r.t usage of bundle/examples, Please share the same.</div><div><br></div><div>Regards</div><div>Sridhar</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 8 Jun 2022 at 19:46, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@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">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 container<br>
>> and HA managed by the Pacemaker which is running as a separate docker<br>
>> container.<br>
>><br>
>> I have done a setup where pacemaker and SQL Server are running as a<br>
>> single docker container, able to achieve HA.<br>
>><br>
>> How to achieve the same when Pacemaker , and Sqlserver are 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 well as<br>
> pacemaker (implying a custom pid 1 script that starts both) and 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 would<br>
> be configured with pacemaker-remoted as its pid 1, and an IP 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 cluster to<br>
> allow the pacemaker containers to manage the db via pacemaker-remoted<br>
> in the db containers.<br>
> <br>
> A custom fence agent would be needed to allow a pacemaker container to<br>
> ask the VM to reboot (kill and relaunch) any other container. 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 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 the VM<br>
> -> if that fails, try to fence the host. Without all of that working,<br>
> something becomes a single point of failure.<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>
>><br>
>> Checked remote node,bundle concepts in Pacemaker unable to make HA<br>
>> setup work.<br>
>><br>
>> Please let me know whether the above scenario can be handled, 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>
</blockquote></div>