ClusterLabs / ClusterLabs/resource-agents

Redis replication no-such-master

Open
#1,319 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Shell
Stars
519
Forks
608
Avg merge
6d 1h
Merged PRs (30d)
7

Description

**Centos 7
pacemaker-libs-1.1.19-8.el7_6.4.x86_64
pacemaker-cluster-libs-1.1.19-8.el7_6.4.x86_64
pacemaker-1.1.19-8.el7_6.4.x86_64
userspace-rcu-0.10.0-3.el7.x86_64
pacemaker-cli-1.1.19-8.el7_6.4.x86_64**

When I create pcaemaker resource:

`pcs resource create p_redis ocf:heartbeat:redis op monitor timeout="60s" interval="45s" op monitor role="Master" timeout="60s" interval="20s" op monitor role="Slave" timeout="60s" interval="60s" master config="/etc/redis.conf"`

**pcs resource show** is:

```
Master/Slave Set: p_redis-master [p_redis]
Masters: [ control1 ]
Slaves: [ control2 control3 ]

```
but slave nodes can't connect to master, which is set to "no-such-master":

34480:S 12 Apr 13:03:08.104 * Connecting to MASTER no-such-master:6379
34480:S 12 Apr 13:03:08.105 # Unable to connect to MASTER: No such file or directory

redis-cli info replication:

control1 | CHANGED | rc=0 >>

role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

control2 | CHANGED | rc=0 >>

role:slave
master_host:no-such-master
master_port:6379
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_repl_offset:1
master_link_down_since_seconds:1555063834
slave_priority:100
slave_read_only:1
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

control3 | CHANGED | rc=0 >>

role:slave
master_host:no-such-master
master_port:6379
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_repl_offset:1
master_link_down_since_seconds:1555063834
slave_priority:100
slave_read_only:1
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

**/etc/redis.conf** :

activerehashing yes
aof-load-truncated yes
aof-rewrite-incremental-fsync yes
appendfilename "appendonly.aof"
appendfsync everysec
appendonly no
auto-aof-rewrite-min-size 64mb
auto-aof-rewrite-percentage 100
bind 10.78.201.16 127.0.0.1
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit pubsub 32mb 8mb 60
client-output-buffer-limit slave 256mb 64mb 60
daemonize no
databases 16
dbfilename dump.rdb
dir /var/lib/redis
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
hll-sparse-max-bytes 3000
hz 10
latency-monitor-threshold 0
list-compress-depth 0
list-max-ziplist-size -2
logfile /var/log/redis/redis.log
loglevel notice
lua-time-limit 5000
no-appendfsync-on-rewrite no
notify-keyspace-events ""
pidfile /var/run/redis_6379.pid
port 6379
protected-mode yes
rdbchecksum yes
rdbcompression yes
repl-disable-tcp-nodelay no
repl-diskless-sync-delay 5
repl-diskless-sync no
save 300 10
save 60 10000
save 900 1
set-max-intset-entries 512
slave-priority 100
slave-read-only yes
slave-serve-stale-data yes
slowlog-log-slower-than 10000
slowlog-max-len 128
stop-writes-on-bgsave-error yes
supervised no
tcp-backlog 511
tcp-keepalive 300
timeout 0
zset-max-ziplist-entries 128
zset-max-ziplist-value 64

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the OCF heartbeat Redis resource invoked by the shown pcs resource command, then compare its replication behavior with /etc/redis.conf and the redis-cli info replication output. Reproduce the setup and trace why the slave nodes receive no-such-master; done means the configured master is reachable and replication reports the expected master link on all slaves.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.