ClusterLabs / ClusterLabs/resource-agents
Redis OCF is not working (for slaves)
- Dominant language
- Shell
- Stars
- 519
- Forks
- 608
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 7
Description
Hi.
With:
pacemaker-2.0.5-9.el8.x86_64
redis-6.0.9-2.module_el8.4.0+580+92c8284e.x86_64
redis-doc-6.0.9-2.module_el8.4.0+580+92c8284e.noarch
pcs-0.10.8-1.el8.x86_64
Redis cluster works as expected outside of pacemaker/pcs.
I try to follow OCF_HEARTBEAT_REDIS man page which suggest setting Redis will be simple.
I do:
`-> $ pcs resource create redis ocf:heartbeat:redis bin=/usr/bin/redis-server client_bin=/usr/bin/redis-cli config=/etc/redis.conf rundir=/run/redis user=redis op monitor interval="1s" role="Master" timeout="5s" on-fail="restart" op monitor interval="2s" role="Slave" timeout="5s" on-fail="restart" promotable`
Master starts on the node cluster chooses:
...
`1281452:M 08 May 2021 09:09:46.423 * MASTER MODE enabled (user request from 'id=15 addr=/run/redis/redis.sock:0 fd=9 name= age=0 idle=0 flags=U db=0 sub=0 psub=0 multi=-1 qbuf=34 qbuf-free=32734 argv-mem=12 obl=0 oll=0 omem=0 tot-mem=61476 events=r cmd=slaveof user=default'`
but slaves, though cluster reports:
...
`* Clone Set: redis-clone [redis] (promotable):`
`* redis (ocf::heartbeat:redis): Slave 10.1.1.224`
`* redis (ocf::heartbeat:redis): Master 10.1.1.223`
`* redis (ocf::heartbeat:redis): Slave 10.1.1.225`
fail with this in the log:
...
`# Unable to connect to MASTER: Resource temporarily unavailable`
What is more interesting and puzzling - on such PCS/RA managed cluster for redis slave do:
`-> $ pcs resource ban redis-clone 10.1.1.224; pcs resource clear redis-clone 10.1.1.224`
and that "failed" node connects to the master in that instant.
Also, moving master clone of such "resurrected" cluster to another node also fails.
many thanks, L.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the OCF_HEARTBEAT_REDIS man page and the ocf:heartbeat:redis resource used by the shown pcs command. Reproduce the promotable Redis setup with the listed monitor operations, then trace why slaves cannot connect to the master until the resource is banned and cleared. Done means slave monitoring and master movement work without manual resource clearing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, shell
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100