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

couchbase-cli: cluster was not rebalanced after launching rebalance

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: tools
    • Security Level: Public
    • Labels:
      None
    • Environment:

      Description

      steps:
      1 - manually add or remove a node
      2 - launch rebalance via cli tool : couchbase-cli rebalance -u Administrator -p password -c 10.1.3.146

      it shows:
      INFO: rebalancing .....
      SUCCESS: rebalanced cluster

      but cluster is not rebalanced

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

        Activity

        Hide
        steve Steve Yen added a comment -

        Hi Bin,
        Can you help diagnose this?
        Thanks,
        Steve

        Show
        steve Steve Yen added a comment - Hi Bin, Can you help diagnose this? Thanks, Steve
        Hide
        bcui Bin Cui added a comment -

        It is a useability issue.
        When using rebalance command, you need to use --server-add for the node to be added. And possible with options --server-add-username and --server-add-password if the to be added node is configured already.

        On the other hand, couchbase-cli should detect the missing option and stop with proper error message.

        Show
        bcui Bin Cui added a comment - It is a useability issue. When using rebalance command, you need to use --server-add for the node to be added. And possible with options --server-add-username and --server-add-password if the to be added node is configured already. On the other hand, couchbase-cli should detect the missing option and stop with proper error message.
        Hide
        bcui Bin Cui added a comment -

        I tried the following command, and it works as expected:

        c:\t3\bin> couchbase-cli rebalance -u Administrator -p 123456 -c localhost --server-add=10.1.3.77 --server-add-username=Administrator --server-add-password=123456

        Show
        bcui Bin Cui added a comment - I tried the following command, and it works as expected: c:\t3\bin> couchbase-cli rebalance -u Administrator -p 123456 -c localhost --server-add=10.1.3.77 --server-add-username=Administrator --server-add-password=123456
        Show
        bcui Bin Cui added a comment - http://review.couchbase.org/#/c/22738/
        Hide
        steve Steve Yen added a comment -

        As Bin mentions, there's confusion / usability (design?) issue mentioned above. Related to...

        > 1 - manually add or remove a node

        I assume that means Iryna added/removed nodes using her web browser. Those add's and remove's are only kept in the browser-side, not on the server-side. One can validate this by having two web browsers and you can see their server add's/remove's aren't visible from each other.

        Same with the couchbase-cli – it is unaware of the add's/remove's done in a separate browser session. So, when you rebalance in the CLI without any --server-add's and --server-remove's, the couchbase server might say "yes, congratulations, you are indeed rebalanced".

        Related, there's also an edge case where a CLI rebalance command, but with no -server-add/-server-remove parameters, is needed and allowed... and that's after failover(s).

        Show
        steve Steve Yen added a comment - As Bin mentions, there's confusion / usability (design?) issue mentioned above. Related to... > 1 - manually add or remove a node I assume that means Iryna added/removed nodes using her web browser. Those add's and remove's are only kept in the browser-side, not on the server-side. One can validate this by having two web browsers and you can see their server add's/remove's aren't visible from each other. Same with the couchbase-cli – it is unaware of the add's/remove's done in a separate browser session. So, when you rebalance in the CLI without any --server-add's and --server-remove's, the couchbase server might say "yes, congratulations, you are indeed rebalanced". Related, there's also an edge case where a CLI rebalance command, but with no - server-add/ -server-remove parameters, is needed and allowed... and that's after failover(s).

          People

          • Assignee:
            bcui Bin Cui
            Reporter:
            iryna iryna
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes