ClusterLabs / ClusterLabs/resource-agents
Redis: never reach "Wait forever for the slave to connect to the master and finish the sync"
- Dominant language
- Shell
- Stars
- 519
- Forks
- 608
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 7
Description
https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/redis.in#L617
# Wait forever for the slave to connect to the master and finish the
# sync. Timeout is controlled by Pacemaker "op start timeout=XX".
#
# hint: redis master_link_status will only come "up" when
# the SYNC with the master has completed.
# This can take an arbitraty time (data) and should
# only be parametrized by the start operation timeout
# by the administrator, not by this resource agent code
Regarding this comment and code following it, I can't see how this code could be reached on slave as function redis_demote() the code is in may be reached in only 2 cases:
- demote
- notify/post-demote
In notify/post-demote there is already no active master. Does pacemaker demotes slaves?
If I read it right, that logic should be in notify/**pre**-demote, so slave could finish the sync while master still present.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at heartbeat/redis.in around line 617 and trace redis_demote() through the demote and notify/post-demote paths. Compare those paths with notify/pre-demote, and verify when Redis master_link_status reaches up while the master is present. Done means the wait-for-sync logic is in the correct lifecycle path and the comments accurately describe Pacemaker's behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, shell
- Domain
- distributed-systems, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100