• Binbin's avatar
    Adjust redis-cli --cluster create arity from -2 to -1 (#12892) · 5b1fe925
    Binbin authored
    When arity is -2, it allows us to input two nodes, but returns:
    ```
    *** ERROR: Invalid configuration for cluster creation.
    *** Redis Cluster requires at least 3 master nodes.
    *** This is not possible with 2 nodes and 0 replicas per node.
    *** At least 3 nodes are required.
    ```
    
    When we input one node, it return:
    ```
    [ERR] Wrong number of arguments for specified --cluster sub command
    ```
    
    Strictly speaking -2 should also be rejected, because redis-cli
    requires at least three nodes. However, the error message was not
    very friendly, so decided to change it arity -1.
    
    This closes #12891.
    5b1fe925
redis-cli.c 375 KB