summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrojingeorge <itsmerojin@gmail.com>2016-06-23 21:58:03 +0530
committerrojingeorge <itsmerojin@gmail.com>2016-06-23 21:58:03 +0530
commit4242fdf45c633701cae7d536bc8af0b6f40e11cd (patch)
tree818fac9e6234b4b8cec662c13763b7ef187df42d
parent4aab50ac7b7565a9d87f5810b07efe1b69e27b1a (diff)
downloadredis-4242fdf45c633701cae7d536bc8af0b6f40e11cd.tar.gz
Display the nodes summary once the cluster is established using redis-trib.rb
Display the nodes summary once the cluster is established using redis-trib.rb After the cluster meet and join was done, when the summary was shown, it was giving info regarding the nodes. This fix ensures that confusion where the slaves were shown as masters. Fix would be to reset the nodes and reload the cluster information before checking the cluster status after creating it.
-rwxr-xr-xsrc/redis-trib.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/redis-trib.rb b/src/redis-trib.rb
index 68d46bdf8..b40b5decb 100755
--- a/src/redis-trib.rb
+++ b/src/redis-trib.rb
@@ -1305,6 +1305,11 @@ class RedisTrib
sleep 1
wait_cluster_join
flush_nodes_config # Useful for the replicas
+ # Reset the node information, so that when the
+ # final summary is listed in check_cluster about the newly created cluster
+ # all the nodes would get properly listed as slaves or masters
+ reset_nodes
+ load_cluster_info_from_node(argv[0])
check_cluster
end