Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-29793

node-init "-c" / "--cluster " command line argument can cause confusion with respect to the value that needs to be provided to it.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • backlog
    • 5.0.1, 5.5.0
    • tools

    Description

      The command for initializing a Couchbase cluster node node-init has an argument  (-c / --cluster) for taking the cluster URL as input as shown below:

      couchbase-cli node-init [--cluster <url>] [--username <user>]
       [--password <password>] [--node-init-data-path <path>]
       [--node-init-index-path <path>] [--node-init-hostname <hostname>]

      For example:

      /opt/couchbase/bin/couchbase-cli node-init -c $DATA_NODE_IP:8091--node-init-data-path=/opt/couchbase/var/lib/couchbase/data -u Administrator -p password
      

      As per the documentation, the cluster URL specifies the following:

       

      -c --cluster
      Specifies the hostname of a node in the cluster. See the HOST FORMATS section for more information on specifying a hostname.
      

      This option is causing a confusion with respect to the value that needs to be passed to it.

      The expected value that needs to be passed to this argument "-c / --cluster" during a node initialization, is the IP address of the node on which the node initialization takes place. However, this argument causes a confusion where "-c"/"–cluster" can even denote the cluster URL of an existing cluster to which this node needs to be added. 

      The server-add command also has the same command line argument "-c / --cluster" that expects the cluster URL of an existing cluster to which a node has to be added.

      For node-init, the argument can be changed from "c/cluster" to something more meaningful like "-node" to ensure that there is no confusion with respect to the value that needs to be passed to it:

      /opt/couchbase/bin/couchbase-cli node-init -node $DATA_NODE_IP:8091--node-init-data-path=/opt/couchbase/var/lib/couchbase/data -u Administrator -p password

      We already have precedent for removing 'global' options such as username and password for reset-admin-password, this would be another example of adjusting the defaults to make the API clearer.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              pvarley Patrick Varley (Inactive)
              sindhura.palakodety Sindhura Palakodety (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty