That old, familiar phrase: “Rebalance recommended, some data does not have the desired number of replicas!”
How can I determine that a rebalance is needed through REST? If a rebalance is stopped, /pools/default/tasks
will show me:
[
{
"status": "notRunning",
"type": "rebalance"
}
]
and rebalanceProgress
gives a status of “none”:
$ curl -s -u $U:$P http://localhost:8091/pools/default/rebalanceProgress | jq .
{
"status": "none"
}
when I look at the bucket map with /pools/default/buckets
the vBucketServerMap.vBucketMap
shows 1024 vBuckets that aren’t evenly dispersed:
$ curl -s -u $U:$P http://localhost:8091/pools/default/buckets | jq .[0].vBucketServerMap.vBucketMap[][] | sort | uniq -c
977 0
95 1
976 2
Is walking through the vBucketMap and counting the nodes my best hope, or is there a simpler way?