<div dir="ltr">Team,<div><br></div><div>Trying to test docker resource agent , getting below error , any issues w.r.t below command ?</div><div><br></div><div>[root@5e8851dac338 /]# pcs resource create test_docker2 ocf:heartbeat:docker image=nginx reuse=true op monitor interval=30s<br></div><div><br></div><div>Docker container nginx is running </div><div>[root@5e8851dac338 /]# docker ps<br>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br>3adb20c8a3fc nginx "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 0.0.0.0:80->80/tcp mynginx1<br>[<br></div><div><br></div><div>pcs status command :</div><div>Failed Resource action</div><div>* test_docker2_stop_0 on 450196e74dc0 'unknown error' (1): call=42, status=complete, exitreason='Docker service is in error state while checking for test_docker2, based on image, nginx: Client: Docker Engine - Community',<br> last-rc-change='Sun Jun 19 20:51:58 2022', queued=0ms, exec=97ms<br></div><div><br></div><div>regards</div><div>Sridhar</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 19 Jun 2022 at 15:40, 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">Thank you Ken,Andrei for the response<div><div><br></div><div>As of now, I have completed the below (below is for POC purpose) Ideally there will be 3 VM's and each VM will have one docker container [pacemaker + corosync + sqlServer] same network</div><div>1.Created a docker image with [pacemaker + corosync + sqlServer]</div><div>2. Created a docker network and brought up 3 containers of the above image which are part of the created network </div><div>3. Created a pacemaker cluster out of 3 containers</div><div>4. Create AG group of sqlserver </div><div>5. Tested failover of Sqlserver , by making a container(i,e pcs cluster standby container id) to standby , failover was working.</div><div><br></div><div>All above was in a VM , now need to think w.r.t fencing </div><div>As the pacemaker is running within the docker container anything w.r.t fencing may not help</div><div>next was checking, how about doing something w.r.t fencing at VM level so that fencing can kill/restart the docker container as required.</div><div><br></div><div>considering 3 VMs</div><div>If 1 VM itself goes down , SqlServer will be still up as two VM's are fine and within them, docker containers (pacemaker + corosync + sqlServer) are running</div><div>If 2 VM goes down , then SqlServer will not be available.</div><div><br></div><div><br></div><div>Related to Bundles</div></div><div>I tried, and got an error posted the same in the forum, also in Bundles required number of replicas will be spawned, How can I configure out of 3 replicas which will be my master Sqlserver and the rest will be replicas</div><div><br></div><div><br></div><div>Hi Ken,</div><div>will check this, if am able to fence docker containers(pacemaker + corosync + sqlServer), it should be of some help, and will check how to handle VM failures</div><div><br></div><div><span style="color:rgb(80,0,80)">You</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> will probably need one fencing agent for each physical host where</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> docker</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> is running and map cluster nodes (containers) to the correct agent</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> (i.e.</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> physical host).</span><br></div><div><br></div><div>Regards</div><div>Sridhar</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 17 Jun 2022 at 20:29, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com" target="_blank">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 17.06.2022 16:53, Sridhar K wrote:<br>
> Hi Team,<br>
> <br>
> Please share any pointers, references, example usage's w.r.t fencing in<br>
> general and its use w.r.t docker containers.<br>
> <br>
> referring as of now<br>
> <a href="https://clusterlabs.org/pacemaker/doc/crm_fencing.html" rel="noreferrer" target="_blank">https://clusterlabs.org/pacemaker/doc/crm_fencing.html</a><br>
> <br>
> need to check the feasibility of fencing w.r.t docker containers<br>
> <br>
<br>
There is fence_docker, you will need to configure docker on each<br>
physical host to accept remote connections from each cluster node. You<br>
will probably need one fencing agent for each physical host where docker<br>
is running and map cluster nodes (containers) to the correct agent (i.e.<br>
physical host).<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>