On 19.06.2022 18:24, Sridhar K wrote: > Team, > > Trying to test docker resource agent , getting below error , any issues > w.r.t below command ? > > [root@5e8851dac338 /]# pcs resource create test_docker2 > ocf:heartbeat:docker image=nginx reuse=true op monitor interval=30s > > Docker container nginx is running > [root@5e8851dac338 /]# docker ps > CONTAINER ID IMAGE COMMAND CREATED STATUS > PORTS NAMES > 3adb20c8a3fc nginx "/docker-entrypoint.…" 2 minutes ago Up 2 > minutes 0.0.0.0:80->80/tcp mynginx1 > [ > > pcs status command : > Failed Resource action > * 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',
This error is string is returned by resource agent when "docker version" returns 1. > last-rc-change='Sun Jun 19 20:51:58 2022', queued=0ms, exec=97ms > > regards > Sridhar > > > > > > > On Sun, 19 Jun 2022 at 15:40, Sridhar K <sri...@gmail.com> wrote: > >> Thank you Ken,Andrei for the response >> >> 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 >> 1.Created a docker image with [pacemaker + corosync + sqlServer] >> 2. Created a docker network and brought up 3 containers of the above image >> which are part of the created network >> 3. Created a pacemaker cluster out of 3 containers >> 4. Create AG group of sqlserver >> 5. Tested failover of Sqlserver , by making a container(i,e pcs cluster >> standby container id) to standby , failover was working. >> >> All above was in a VM , now need to think w.r.t fencing >> As the pacemaker is running within the docker container anything w.r.t >> fencing may not help >> 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. >> >> considering 3 VMs >> 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 >> If 2 VM goes down , then SqlServer will not be available. >> >> >> Related to Bundles >> 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 >> >> >> Hi Ken, >> 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 >> >> You >>> will probably need one fencing agent for each physical host where >>> docker >>> is running and map cluster nodes (containers) to the correct agent >>> (i.e. >>> physical host). >> >> Regards >> Sridhar >> >> >> >> >> On Fri, 17 Jun 2022 at 20:29, Andrei Borzenkov <arvidj...@gmail.com> >> wrote: >> >>> On 17.06.2022 16:53, Sridhar K wrote: >>>> Hi Team, >>>> >>>> Please share any pointers, references, example usage's w.r.t fencing in >>>> general and its use w.r.t docker containers. >>>> >>>> referring as of now >>>> https://clusterlabs.org/pacemaker/doc/crm_fencing.html >>>> >>>> need to check the feasibility of fencing w.r.t docker containers >>>> >>> >>> There is fence_docker, you will need to configure docker on each >>> physical host to accept remote connections from each cluster node. You >>> will probably need one fencing agent for each physical host where docker >>> is running and map cluster nodes (containers) to the correct agent (i.e. >>> physical host). >>> >>> _______________________________________________ >>> 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/ _______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/