Closed liuyp2018 closed 4 years ago
经测试在 增加节点 --> 删除非增加节点 --> 切换私网,会导致切换私网失败
cat nodes
1/1/master/i-2nkvjdaf/192.168.1.28
1/2/slave/i-0h6x08a1/192.168.1.24
3/5/master/i-6g2zat1m/192.168.1.21
3/6/slave/i-u03jpmpn/192.168.1.26
4/7/master/i-dw89b6p7/192.168.1.22
4/8/slave/i-rj3rmzwk/192.168.1.23
5/9/master/i-m3osj290/192.168.1.25
5/10/slave/i-asrj5789/192.168.1.27
cat nodes.1
1/1/master/i-2nkvjdaf/192.168.2.21
1/2/slave/i-0h6x08a1/192.168.2.23
2/3/master/i-uzpi8kcp/192.168.2.22
2/4/slave/i-ae0953xi/192.168.2.20
3/5/master/i-6g2zat1m/192.168.2.24
3/6/slave/i-u03jpmpn/192.168.2.19
4/7/master/i-dw89b6p7/192.168.2.16
4/8/slave/i-rj3rmzwk/192.168.2.14
5/9/master/i-m3osj290/192.168.2.13
5/10/slave/i-asrj5789/192.168.2.17
在使用
nodesFile=/data/redis/nodes
join -1 4 -2 4 -t/ -o1.5,2.5 $nodesFile.1 $nodesFile
输出:
192.168.2.21/192.168.1.28
192.168.2.23/192.168.1.24
join: /data/redis/nodes:5: is not sorted: 4/7/master/i-dw89b6p7/192.168.1.22
join: /data/redis/nodes.1:4: is not sorted: 2/4/slave/i-ae0953xi/192.168.2.20
集群cl-tn6kk5ma经过一系列的操作:添加节点-扩容集群-删除节点-切换网络 后,节点显示不正常