Describe the bug
A short description of the bug.
my redis cluster have problem like this:
root@175-69-174-222:~# kubectl logs -f --tail 999 -n redis-system redis-operator-7578f7c544-nmn2b ^C
root@175-69-174-222:~# kubectl get pods -n redis-system -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
redis-follower-0 2/2 Running 0 20h 10.233.74.122 node4 <none> <none>
redis-follower-1 2/2 Running 0 20h 10.233.74.127 node4 <none> <none>
redis-follower-2 2/2 Running 0 19h 10.233.74.89 node4 <none> <none>
redis-leader-0 2/2 Running 0 20h 10.233.74.82 node4 <none> <none>
redis-leader-1 2/2 Running 0 19h 10.233.74.75 node4 <none> <none>
redis-leader-2 2/2 Running 0 19h 10.233.74.110 node4 <none> <none>
redis-operator-7578f7c544-nmn2b 1/1 Running 8 (17h ago) 20h 10.233.74.91 node4 <none> <none>
root@175-69-174-222:~#
root@175-69-174-222:~#
root@175-69-174-222:~# kubectl exec -n redis-system redis-leader-0 -- redis-cli cluster info
Defaulting container name to redis-leader.
Use 'kubectl describe pod/redis-leader-0 -n redis-system' to see all of the containers in this pod.
NOAUTH Authentication required.
root@175-69-174-222:~# kubectl exec -n redis-system redis-leader-0 -- redis-cli cluster infokubectl exec -n redis-system redis-leader-0 -- redis-cli -c -a <password> cluster^C
root@175-69-174-222:~#
root@175-69-174-222:~#
root@175-69-174-222:~# kubectl exec -n redis-system redis-leader-0 -- redis-cli -c -a <password> cluster info
Defaulting container name to redis-leader.
Use 'kubectl describe pod/redis-leader-0 -n redis-system' to see all of the containers in this pod.
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
cluster_state:fail
cluster_slots_assigned:16384
cluster_slots_ok:5461
cluster_slots_pfail:10923
cluster_slots_fail:0
cluster_known_nodes:5
cluster_size:3
cluster_current_epoch:15
cluster_my_epoch:1
cluster_stats_messages_ping_sent:4
cluster_stats_messages_sent:4
cluster_stats_messages_received:0
root@175-69-174-222:~#
root@175-69-174-222:~# kubectl exec -n redis-system redis-leader-0 -- redis-cli -c -a <password> cluster nodes
Defaulting container name to redis-leader.
Use 'kubectl describe pod/redis-leader-0 -n redis-system' to see all of the containers in this pod.
58913a2fbf0932adc3c829c906cfa43d596c37ef 10.233.100.184:6379@16379 master,fail? - 1691046710926 1691046673341 14 connected 5461-10922
4d0a34c58279aa8b5f18ce8e2c31226bdfecf293 10.233.100.191:6379@16379 master,fail? - 1691046710926 1691046673341 6 connected 10923-16383
1ca641a43263880e7cf7384be8e6c3594cbca777 10.233.74.92:6379@16379 slave,fail? 4d0a34c58279aa8b5f18ce8e2c31226bdfecf293 1691046710926 1691046673341 6 connected
fb0c88d0b27936956ec71975792e994c55b6f0bc 10.233.74.82:6379@16379 myself,master - 0 1691046673341 1 connected 0-5460
bca2cc8acc12c7afae82ac580ae87f1f8c477c40 10.233.74.72:6379@16379 slave,fail? 58913a2fbf0932adc3c829c906cfa43d596c37ef 1691046710926 1691046673341 14 connected
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
root@175-69-174-222:~#
I want to solve this problem by execute redis-cli --cluster add-node command,like this: redis-cli --cluster add-node 10.233.74.71:6379 10.233.74.65:6379 --cluster-slave -a <password>
but this command no return for long time.
bash-4.4$ time redis-cli --cluster add-node 10.233.74.89:6379 10.233.74.110:6379 --cluster-slave -a <password>
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
>>> Adding node 10.233.74.89:6379 to cluster 10.233.74.110:6379
^C
real 1m40.952s
user 0m0.000s
sys 0m0.002s
bash-4.4$
To reproduce
redis version: 6.2.6 redis config like this:
bind 0.0.0.0
protected-mode yes
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
supervised no
pidfile /var/run/redis.pid
masterauth <password>
requirepass <password>
cluster-enabled yes
cluster-node-timeout 5000
cluster-require-full-coverage no
cluster-migration-barrier 1
cluster-config-file /data/nodes.conf
save 900 1
save 300 10
save 60 10000
appendonly yes
appendfilename "appendonly.aof"
dir /data
Expected behavior
I want to learn how to resolve this problem when i execute “redis-cli --cluster add-node” command, what does redis do ?
Additional information
Any additional information that is relevant to the problem.