Skip to content

Manual node approval

odiszapc edited this page Jan 1, 2015 · 4 revisions

To have a control over new nodes adding, you can configure cluster the way each new node must be approved manually (this behaviour may be changed in future).

It's controlled by the configuration parameter:

{
  "name": "StemCluster",
  "vBuckets": 100000,
  "rf": 1,
  "partitioner": "crush",
  "meta": {
    "contactPoints": ["localhost"]
  },
  "configuration": {
    "autoApproval": true    <------
  }
}

After node started look what pending nodes we have by running curl http://localhost:9997/api/cluster/unauthorized. You'll see the list looks like:

{
  "nodes": [
    {
      "id": "081955d7-8c46-47fe-bfb2-09e7413eb726", # <-- we need this ID
...

Now we need to approve the node by sending its id to cluster manager (DC1 and RACK1 are default values of datacenter and rack): curl http://localhost:9997/api/cluster/authorize -X POST -H "Content-Type: application/json" -d "{\"nodeId\":\"081955d7-8c46-47fe-bfb2-09e7413eb726\",\"datacenter\":\"DC1\",\"rack\":\"RACK1\"}"

Clone this wiki locally