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

API call to check if a cluster needs rebalancing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 5.0.0
    • Component/s: ns_server
    • Labels:
      None

      Description

      Issue
      When a cluster needs rebalancing, a warning is displayed in the web UI:
      “Fail Over Warning: Rebalance required, some data is not currently replicated”
      however it is not possible to check if a cluster needs rebalancing from the command line.

      Request
      Add a command to check if a cluster needs rebalancing.

        Attachments

          Issue Links

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

            Activity

            Hide
            cihan Cihan Biyikoglu (Inactive) added a comment -

            Anil Assigning to you. looks like we are missing this in CLI and REST. We should look at adding these to the list of calls we support in future.
            thanks
            -cihan

            Show
            cihan Cihan Biyikoglu (Inactive) added a comment - Anil Assigning to you. looks like we are missing this in CLI and REST. We should look at adding these to the list of calls we support in future. thanks -cihan
            Hide
            bj Bryce Jasmer added a comment -

            Ideally, this would be bubbled up as a stat in the /pools/default/buckets/<bucket_name>/stats endpoint. A boolean telling you that the cluster is fully balanced or not would be helpful, but a gauge indicating how many vBuckets are not replicated would be even more helpful.

            If this ends up in a separate REST endpoint, all interested parties will have to implement a new REST call and a way to handle and alert on the results. If it is added to /stats, monitoring software might not need to be changed and will just need to create a new monitoring rule to look for the new value not being "0" instead of having to write and deploy new code.

             

            Show
            bj Bryce Jasmer added a comment - Ideally, this would be bubbled up as a stat in the /pools/default/buckets/<bucket_name>/stats endpoint. A boolean telling you that the cluster is fully balanced or not would be helpful, but a gauge indicating how many vBuckets are not replicated would be even more helpful. If this ends up in a separate REST endpoint, all interested parties will have to implement a new REST call and a way to handle and alert on the results. If it is added to /stats, monitoring software might not need to be changed and will just need to create a new monitoring rule to look for the new value not being "0" instead of having to write and deploy new code.  
            Hide
            ajit.yagaty Ajit Yagaty [X] (Inactive) added a comment -

            Bubbling it up as a stat in /pools/default/buckets/<bucket_name>/stats endpoint would be restricted to that one particular bucket. But the ask here is to indicate whether a rebalance is needed at a cluster level (all buckets + services) isn't it?

            Show
            ajit.yagaty Ajit Yagaty [X] (Inactive) added a comment - Bubbling it up as a stat in /pools/default/buckets/<bucket_name>/stats endpoint would be restricted to that one particular bucket. But the ask here is to indicate whether a rebalance is needed at a cluster level (all buckets + services) isn't it?
            Hide
            ajit.yagaty Ajit Yagaty [X] (Inactive) added a comment -

            Now, a boolean property called "balanced" is output when a GET is issued to the /pools/default endpoint (true means cluster is balanced and false means otherwise):

             

            $> curl -s -X GET -u Administrator:asdasd http://localhost:9000/pools/default | jq .balanced
            true
            

             

            Show
            ajit.yagaty Ajit Yagaty [X] (Inactive) added a comment - Now, a boolean property called "balanced" is output when a GET is issued to the /pools/default endpoint (true means cluster is balanced and false means otherwise):   $> curl -s -X GET -u Administrator:asdasd http: //localhost:9000/pools/default | jq .balanced true  
            Hide
            build-team Couchbase Build Team added a comment -

            Build 5.0.0-3059 contains ns_server commit 6f7d8c53898694f390296fd6669decf139094e22 with commit message:
            MB-19534: Made the 'balanced' property in pool info...
            https://github.com/couchbase/ns_server/commit/6f7d8c53898694f390296fd6669decf139094e22

            Show
            build-team Couchbase Build Team added a comment - Build 5.0.0-3059 contains ns_server commit 6f7d8c53898694f390296fd6669decf139094e22 with commit message: MB-19534 : Made the 'balanced' property in pool info... https://github.com/couchbase/ns_server/commit/6f7d8c53898694f390296fd6669decf139094e22
            Hide
            bharath.gp Bharath G P added a comment -

            Validated on 5.0.0-3255

            Show
            bharath.gp Bharath G P added a comment - Validated on 5.0.0-3255

              People

              Assignee:
              ajit.yagaty Ajit Yagaty [X] (Inactive)
              Reporter:
              alla.tumarkin Alla Tumarkin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty