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

couchbase-cli does not allow to set index_path separately from data path( --node-init-data-path sets for both data and index paths)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1.0
    • Component/s: tools
    • Security Level: Public

      Description

      now we can set only --node-init-data-path, for example:

      ./couchbase-cli node-init -c localhost:8091 -u Administrator -p password --node-init-data-path=/tmp

      at the same time we can set via rest API different or separate values:

      [root@cen-2708 bin]# curl -i --data "path=%2Ftmp%2Fa&index_path=%2Ftmp%2Fb" "http://Administrator:password@10.3.121.68:8091/nodes/self/controller/settings"
      HTTP/1.1 200 OK
      Server: Couchbase Server 2.0.0-11302012A-toy-community
      Pragma: no-cache
      Date: Mon, 03 Dec 2012 15:32:30 GMT
      Content-Length: 0
      Cache-Control: no-cache

      [root@cen-2708 bin]# curl -i --data "index_path=%2Ftmp%2Fc" "http://Administrator:password@10.3.121.68:8091/nodes/self/controller/settings"
      HTTP/1.1 200 OK
      Server: Couchbase Server 2.0.0-11302012A-toy-community
      Pragma: no-cache
      Date: Mon, 03 Dec 2012 15:32:39 GMT
      Content-Length: 0
      Cache-Control: no-cache

      note, that bug 'MB-7257 All data will be deleted when change Data Files path on online server' is still opened

      ./couchbase-cli -h
      couchbase-cli - command-line cluster administration tool

      usage: couchbase-cli COMMAND CLUSTER [OPTIONS]

      COMMAND:
      server-list list all servers in a cluster
      server-info show details on one server
      server-add add one or more servers to the cluster
      server-readd readd a server that was failed over
      rebalance start a cluster rebalancing
      rebalance-stop stop current cluster rebalancing
      rebalance-status show status of current cluster rebalancing
      failover failover one or more servers
      cluster-init set the username,password and port of the cluster
      node-init set node specific parameters
      bucket-list list all buckets in a cluster
      bucket-create add a new bucket to the cluster
      bucket-edit modify an existing bucket
      bucket-delete delete an existing bucket
      bucket-flush flush a given bucket
      help show longer usage/help and examples

      CLUSTER:
      --cluster=HOST[:PORT] or -c HOST[:PORT]

      OPTIONS:
      -u USERNAME, --user=USERNAME admin username of the cluster
      -p PASSWORD, --password=PASSWORD admin password of the cluster
      -o KIND, --output=KIND KIND is json or standard
      -d, --debug

      server-add OPTIONS:
      --server-add=HOST[:PORT] server to be added
      --server-add-username=USERNAME admin username for the
      server to be added
      --server-add-password=PASSWORD admin password for the
      server to be added

      server-readd OPTIONS:
      --server-add=HOST[:PORT] server to be added
      --server-add-username=USERNAME admin username for the
      server to be added
      --server-add-password=PASSWORD admin password for the
      server to be added

      rebalance OPTIONS:
      --server-add* see server-add OPTIONS
      --server-remove=HOST[:PORT] the server to be removed

      failover OPTIONS:
      --server-failover=HOST[:PORT] server to failover

      cluster-init OPTIONS:
      --cluster-init-username=USER new admin username
      --cluster-init-password=PASSWORD new admin password
      --cluster-init-port=PORT new cluster REST/http port
      --cluster-init-ramsize=RAMSIZEMB per node ram quota in MB

      node-init OPTIONS:
      --node-init-data-path=PATH per node path to store data

      bucket-* OPTIONS:
      --bucket=BUCKETNAME bucket to act on
      --bucket-type=TYPE memcached or couchbase
      --bucket-port=PORT supports ASCII protocol and is auth-less
      --bucket-password=PASSWORD standard port, exclusive with bucket-port
      --bucket-ramsize=RAMSIZEMB ram quota in MB
      --bucket-replica=COUNT replication count

      The default PORT number is 8091.

      EXAMPLES:
      List servers in a cluster:
      couchbase-cli server-list -c 192.168.0.1:8091

      Server information:
      couchbase-cli server-info -c 192.168.0.1:8091

      Add a node to a cluster, but do not rebalance:
      couchbase-cli server-add -c 192.168.0.1:8091 \
      --server-add=192.168.0.2:8091 \
      --server-add-username=Administrator \
      --server-add-password=password

      Add a node to a cluster and rebalance:
      couchbase-cli rebalance -c 192.168.0.1:8091 \
      --server-add=192.168.0.2:8091 \
      --server-add-username=Administrator \
      --server-add-password=password

      Remove a node from a cluster and rebalance:
      couchbase-cli rebalance -c 192.168.0.1:8091 \
      --server-remove=192.168.0.2:8091

      Remove and add nodes from/to a cluster and rebalance:
      couchbase-cli rebalance -c 192.168.0.1:8091 \
      --server-remove=192.168.0.2 \
      --server-add=192.168.0.4 \
      --server-add-username=Administrator \
      --server-add-password=password

      Stop the current rebalancing:
      couchbase-cli rebalance-stop -c 192.168.0.1:8091

      Change the username, password, port and ram quota:
      couchbase-cli cluster-init -c 192.168.0.1:8091 \
      --cluster-init-username=Administrator \
      --cluster-init-password=password \
      --cluster-init-port=8080 \
      --cluster-init-ramsize=300

      Change the data path:
      couchbase-cli node-init -c 192.168.0.1:8091 \
      --node-init-data-path=/tmp

      List buckets in a cluster:
      couchbase-cli bucket-list -c 192.168.0.1:8091

      Create a new dedicated port couchbase bucket:
      couchbase-cli bucket-create -c 192.168.0.1:8091 \
      --bucket=test_bucket \
      --bucket-type=couchbase \
      --bucket-port=11222 \
      --bucket-ramsize=200 \
      --bucket-replica=1

      Create a new sasl memcached bucket:
      couchbase-cli bucket-create -c 192.168.0.1:8091 \
      --bucket=test_bucket \
      --bucket-type=memcached \
      --bucket-password=password \
      --bucket-ramsize=200

      Modify a dedicated port bucket:
      couchbase-cli bucket-edit -c 192.168.0.1:8091 \
      --bucket=test_bucket \
      --bucket-port=11222 \
      --bucket-ramsize=400

      Delete a bucket:
      couchbase-cli bucket-delete -c 192.168.0.1:8091 \
      --bucket=test_bucket

      # Subject Project Status CR V
      For Gerrit Dashboard: &For+MB-7323=message:MB-7323

        Activity

        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        2.0 users can use REST api for making the change

        Show
        farshid Farshid Ghods (Inactive) added a comment - 2.0 users can use REST api for making the change
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        needs to be added to documentation

        Show
        farshid Farshid Ghods (Inactive) added a comment - needs to be added to documentation
        Hide
        mccouch MC Brown (Inactive) added a comment -

        Documentation has been updated with the limitation with the command-line tool, and supported parameters for the REST API.

        Show
        mccouch MC Brown (Inactive) added a comment - Documentation has been updated with the limitation with the command-line tool, and supported parameters for the REST API.
        Hide
        kzeller kzeller added a comment -

        Added to RN: The couchbase command line tool, <command>couchbase-cli</command> does not
        enable you to set <command>index_path</command> as a separate parameter as
        <command>data_path</command>. The former contains indexed data from defined
        views functions, while the later contains keys, metadata, and JSON documents.
        You can however use the REST-API to do this.

        Show
        kzeller kzeller added a comment - Added to RN: The couchbase command line tool, <command>couchbase-cli</command> does not enable you to set <command>index_path</command> as a separate parameter as <command>data_path</command>. The former contains indexed data from defined views functions, while the later contains keys, metadata, and JSON documents. You can however use the REST-API to do this.
        Hide
        mccouch MC Brown (Inactive) added a comment -

        Docs limitation has been updated; handing back

        Show
        mccouch MC Brown (Inactive) added a comment - Docs limitation has been updated; handing back
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        couchbase-cli need to be updated and allow users to modify such settings

        Show
        farshid Farshid Ghods (Inactive) added a comment - couchbase-cli need to be updated and allow users to modify such settings
        Show
        bcui Bin Cui added a comment - http://review.couchbase.org/#/c/24802/
        Hide
        anil Anil Kumar added a comment -
        Show
        anil Anil Kumar added a comment - MB-7372
        Hide
        maria Maria McDuff (Inactive) added a comment -
        Show
        maria Maria McDuff (Inactive) added a comment - MB-7372

          People

          • Assignee:
            bcui Bin Cui
            Reporter:
            andreibaranouski Andrei Baranouski
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes