Redis cluster formed on k8s but replica IPs are not proper in “ROLE” command

96 views
Skip to first unread message

rajanar...@gmail.com

unread,
Dec 4, 2020, 12:10:32 AM12/4/20
to Redis DB
I'm trying to spawn a Redis cluster on k8s. Cluster is created successfully, but I see slave node IPs are not proper in Redis application. Please go through the following steps. 

==> 6 Redis pods are created
redis-db-0 1/1 Running 0 17m 10.1.81.107 node1 <none> <none> 
redis-db-1 1/1 Running 0 17m 10.1.46.138 node2 <none> <none>
redis-db-2 1/1 Running 0 17m 10.1.32.133 node3 <none> <none> 
redis-db-3 1/1 Running 0 17m 10.1.46.139 node2 <none> <none>
redis-db-4 1/1 Running 0 17m 10.1.81.108 node1 <none> <none>
redis-db-5 1/1 Running 0 17m 10.1.46.140 node2 <none> <none>  

==> Command is issued to create the cluster
>>> Performing Cluster Check (using node 10.1.46.138:6379) M: 42f3c1a2f39977d9ff303c5b8fcdf23a40aff650 10.1.46.138:6379 slots:[0-5460] (5461 slots) master 1 additional replica(s) M: a9335dd19b0f6c471d0adad5aa1f2c676e594f6a 10.1.81.107:6379 slots:[10923-16383] (5461 slots) master 1 additional replica(s) S: 2ee7372bbb97d0e4f5e9dc40cc86f40515c88d03 10.1.32.133:6379 slots: (0 slots) slave replicates 42f3c1a2f39977d9ff303c5b8fcdf23a40aff650 S: 5accbad4ec2851f0a71a0e4f5395195aee38e1e4 10.1.81.108:6379 slots: (0 slots) slave replicates 8ab97a1d6bd7b74fa671758e88a6cb71c2e039d3 M: 8ab97a1d6bd7b74fa671758e88a6cb71c2e039d3 10.1.46.139:6379 slots:[5461-10922] (5462 slots) master 1 additional replica(s) S: 361a18592a36c7eb6bb25c7ddbb4565f0c2f026b 10.1.46.140:6379 slots: (0 slots) slave replicates a9335dd19b0f6c471d0adad5aa1f2c676e594f6a [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered.  

==> Logged into one of the master(For example redis-db-3) to check the role. Slave IP is wrong.
redis-cli -h 10.1.46.139 -p 6379 
1) "master"
2) (integer) 616 
3) 1) 1) "10.1.81.0"
      2) "6379" 
      3) "616"  

==> Cluster nodes commands returns proper IP addresses.
10.1.46.139:6379> cluster nodes 42f3c1a2f39977d9ff303c5b8fcdf23a40aff650 10.1.46.138:6379@16379 master - 0 1606743954000 1 connected 0-5460 2ee7372bbb97d0e4f5e9dc40cc86f40515c88d03 10.1.32.133:6379@16379 slave 42f3c1a2f39977d9ff303c5b8fcdf23a40aff650 0 1606743954000 1 connected a9335dd19b0f6c471d0adad5aa1f2c676e594f6a 10.1.81.107:6379@16379 master - 0 1606743954000 3 connected 10923-16383 8ab97a1d6bd7b74fa671758e88a6cb71c2e039d3 10.1.46.139:6379@16379 myself,master - 0 1606743954000 2 connected 5461-10922 361a18592a36c7eb6bb25c7ddbb4565f0c2f026b 10.1.46.140:6379@16379 slave a9335dd19b0f6c471d0adad5aa1f2c676e594f6a 0 1606743954000 3 connected 5accbad4ec2851f0a71a0e4f5395195aee38e1e4 10.1.81.108:6379@16379 slave 8ab97a1d6bd7b74fa671758e88a6cb71c2e039d3 0 1606743954000 2 connected  


Could someone please let me know what is going wrong here? Appreciate your help.

In redis-server logs, I could see "Accepted 10.1.32.0:53996"

1:M 30 Nov 2020 13:22:22.668 . 0 clients connected (0 replicas), 1461616 bytes in use 1:M 30 Nov 2020 13:22:23.471 - Accepted 10.1.32.0:53996 1:M 30 Nov 2020 13:22:23.504 # configEpoch set to 1 via CLUSTER SET-CONFIG-EPOCH 1:M 30 Nov 2020 13:22:23.510 - Accepting cluster node connection from 10.1.46.140:33187 1:M 30 Nov 2020 13:22:23.510 . --- Processing packet of type 2, 2256 bytes 1:M 30 Nov 2020 13:22:23.511 . Ping packet received: (nil) 1:M 30 Nov 2020 13:22:23.511 . pong packet received: (nil) 1:M 30 Nov 2020 13:22:23.544 - Accepting cluster node connection from 10.1.46.139:35289 1:M 30 Nov 2020 13:22:23.545 . --- Processing packet of type 2, 2256 bytes 1:M 30 Nov 2020 13:22:23.545 . Ping packet received: (nil) 1:M 30 Nov 2020 13:22:23.545 . pong packet received: (nil) 1:M 30 Nov 2020 13:22:23.565 - Accepting cluster node connection from 10.1.81.0:43261 1:M 30 Nov 2020 13:22:23.566 . --- Processing packet of type 2, 2256 bytes  

==> Redis configuration is

cluster-enabled yes

cluster-config-file /rajredisdata/nodes.conf

cluster-node-timeout 1000

#appendonly yes

# few configuration from the redis issue links

cluster-slave-validity-factor 0

repl-diskless-sync yes

repl-diskless-sync-delay 0

client-output-buffer-limit slave 0 0 0

cluster-announce-ip 10.81.1.129

cluster-announce-port 6379

cluster-announce-bus-port 16379


Note: I haven't seen any issue in functionality so far, but slightly worried if this may result in some sort of issues.


Thanks,

Raj

Reply all
Reply to author
Forward
0 new messages