Hi All,
Able to bring up redis cluster with three masters (no slaves) using "redis-trib.rb create" command in normal environment.
Then, want to achieve the same via docker/swarm .
Steps :
1] Initiated docker swarm on a node and joined other two nodes to swam as managers. (in total now 3 nodes and all are managers).
2] Created a Overlay network with encryption using the command :
"docker network create redis-network --driver overlay --opt encrypted"
3] Deployed redis service using the command :
"docker service create --publish=6381:6381 --publish=16381:16381 --mode=global --network=redis-network --detach=false --name=redis redis:3.2.8 --cluster-enabled yes --cluster-node-timeout 15000 --cluster-require-full-coverage no --protected-mode no --port 6381 --appendonly yes --appendfsync everysec --logfile redis1.log --loglevel debug".
Can see that on three nodes redis service was started in cluster mode & confirmed the same using "docker ps" command.
4] Got in to the container ("docker exec -it <container ID /bin/bash>") of one of the nodes and executed command "redis-trib.rb create <IP1>:6381 <IP2>:6381 <IP3>:6381"
some times command never returned & some times it returned with err some thing like "slot coverage not OK"
I cant get enough information from redis logs too. How to proceed on this further ?? Interestingly, "redis-cli cluster meet" command responds with "OK" from all nodes. Redis version being used was 3.2.8.
##################
>>> Performing hash slots allocation on 3 nodes...
slots:0-5460 (5461 slots) master
slots:5461-10922 (5462 slots) master
slots:10923-16383 (5461 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^C/usr/local/bin/redis-trib.rb:653:in `sleep': Interrupt
from /usr/local/bin/redis-trib.rb:653:in `wait_cluster_join'
from /usr/local/bin/redis-trib.rb:1306:in `create_cluster_cmd'
from /usr/local/bin/redis-trib.rb:1701:in `<main>'
#########################