Removing Nodes from Clusters

  • reference
    +
    Remove nodes from clusters with the POST /controller/ejectNode HTTP method and URI.

    HTTP method and URI

    Server nodes are typically removed from a cluster when the node is temporarily or permanently down.

    The method /controller/ejectNode cannot remove active nodes. It can be used only on failed over nodes, nodes in pending state, or nodes that have been recently added or joined but not yet rebalanced into the cluster. Removing an active node must be done with the /controller/rebalance endpoint.

    POST /controller/ejectNode

    Syntax

    HTTP request syntax:

    POST /controller/ejectNode
    Host: [localhost]:8091
    Authorization: Basic xxxxxxxxxxxx
    Accept: */*
    Content-Length: xxxxxxxxxx
    Content-Type: application/x-www-form-urlencoded
    otpNode=[node@hostname]

    Curl request syntax:

    curl -u admin:password -d otpNode=[node@hostname] \
      http://[localhost]:8091/controller/ejectNode

    Example

    HTTP request example:

    POST /controller/ejectNode
    Host: 192.168.0.106:8091
    Authorization: Basic xxxxxxxxxxxx
    Accept: */*
    Content-Length: xxxxxxxxxx
    Content-Type: application/x-www-form-urlencoded
    otpNode=ns_1@192.168.0.107

    Curl request example:

    curl -u Administrator:password -d 'otpNode=ns_1@192.168.0.107' \
      http://192.168.0.106:8091/controller/ejectNode

    Response codes

    200 OK - node ejected
    400 Error, the node to be ejected does not exist
    401 Unauthorized - Credentials were not supplied and are required
    403 Forbidden - Credentials were supplied and are incorrect