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

Changing data path deletes all buckets

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: None
    • Security Level: Public
    • Labels:
      None

      Description

      Thankfully this didn't happen on a live system, but running the following command against a node of a cluster with buckets already configured deleted them all:
      /opt/couchbase/bin/couchbase-cli node-init -c 10.145.129.217:8091 -u Administrator -p administrator --node-init-data-path=/disk2/couchbase/data/

      Let me know if you need me to reproduce this, so far has happened twice (and I expect to continue as I go through the rest of the nodes)

      Perry

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

        Activity

        Hide
        mccouch MC Brown (Inactive) added a comment -

        So do we want to document that to change the data path, you must:

        1. Remove the node from the cluster
        2. Update the data path through REST
        3. Re-add the node to the cluster

        If so, I can add a suitable section to the end of the admin tasks section.

        Show
        mccouch MC Brown (Inactive) added a comment - So do we want to document that to change the data path, you must: 1. Remove the node from the cluster 2. Update the data path through REST 3. Re-add the node to the cluster If so, I can add a suitable section to the end of the admin tasks section.
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        #2 > reset the node if node is still in a provisioned state after removing from the cluster. to reset the node you can use ejectNode api or reinstall couchbase
        #3. update the data path
        #4. re-add the node

        Show
        farshid Farshid Ghods (Inactive) added a comment - #2 > reset the node if node is still in a provisioned state after removing from the cluster. to reset the node you can use ejectNode api or reinstall couchbase #3. update the data path #4. re-add the node
        Hide
        perry Perry Krug added a comment -

        FYI, you don't "need" to update the path via the REST API. The first page of the setup wizard lets you set the data path. So I would say the documentation should be:

        If you want to change the data path of an existing node, you should first rebalance it out of the cluster (making sure you follow these best practices so as not to reduce the capacity of your cluster and impact performance...in here we should have that the best practice is to always swap it with a new node, do we have that somewhere yet?) and then change the data path either using the web UI, the CLI or the REST API and add it back to the cluster with a rebalance.

        Show
        perry Perry Krug added a comment - FYI, you don't "need" to update the path via the REST API. The first page of the setup wizard lets you set the data path. So I would say the documentation should be: If you want to change the data path of an existing node, you should first rebalance it out of the cluster (making sure you follow these best practices so as not to reduce the capacity of your cluster and impact performance...in here we should have that the best practice is to always swap it with a new node, do we have that somewhere yet?) and then change the data path either using the web UI, the CLI or the REST API and add it back to the cluster with a rebalance.
        Hide
        mccouch MC Brown (Inactive) added a comment -

        I'm adding a new section into the admin tasks based on this approach.

        Yes, we have best practice on not reducing node counts and swapping them out.

        Show
        mccouch MC Brown (Inactive) added a comment - I'm adding a new section into the admin tasks based on this approach. Yes, we have best practice on not reducing node counts and swapping them out.
        Hide
        mccouch MC Brown (Inactive) added a comment -

        Documentation has been updated with a new section with the recommended process:

        http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-changepath.html

        Show
        mccouch MC Brown (Inactive) added a comment - Documentation has been updated with a new section with the recommended process: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-changepath.html

          People

          • Assignee:
            mccouch MC Brown (Inactive)
            Reporter:
            perry Perry Krug
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes