We have a redis cluster for 6.2.4 version and cluster-allow-replica-migration is set to yes (default)
when use redis-cli to remove a master node,get error info
the commmand is : redis-cli --cluster reshard --cluster-from {src_id} --cluster-to {dest_id} --cluster-slots {slots} --cluster-yes {ip}:{port}
error info is: Node {IP}:6379 replied with error: ERR Please use SETSLOT only with masters.
the possible reason may be ? (1) when cluster-allow-replica-migration is yes,a master node without slot will be change to a slave node (2) when reshard a master node A and all slot are moved, the node is change to slave (3) in move slot command , the last step is tell all master node, the slot is moved to another master node (SETSLOT) (4) in step 3, when SETSLOT command send to node A, error happen , because the node A is slave now ?
Comment From: huangzhw
reshard send SETSLOT to target node, the epoch of target node is bumped, then message sent to source node. source node lost it's last slot, so become replica of the target node. So the reason is (2).