Voting configuration exclusions API
editVoting configuration exclusions API
editAdds or removes master-eligible nodes from the voting configuration exclusion list.
Request
editPOST _cluster/voting_config_exclusions?node_names=<node_names>
POST _cluster/voting_config_exclusions?node_ids=<node_ids>
DELETE _cluster/voting_config_exclusions
Description
editBy default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks.
If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, you must use this API to remove departed nodes from the voting configuration manually. It adds an entry for that node in the voting configuration exclusions list. The cluster then tries to reconfigure the voting configuration to remove that node and to prevent it from returning.
If the API fails, you can safely retry it. Only a successful response guarantees that the node has been removed from the voting configuration and will not be reinstated.
Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period. They are not required when removing master-ineligible nodes or fewer than half of the master-eligible nodes.
For more information, see Removing master-eligible nodes.
Query parameters
edit-
node_names
-
A comma-separated list of the names of the nodes to exclude from the voting
configuration. If specified, you may not also specify
?node_ids
. -
node_ids
-
A comma-separated list of the persistent ids of the nodes to exclude from the
voting configuration. If specified, you may not also specify
?node_names
. -
timeout
-
(Optional, time units) When adding a voting configuration
exclusion, the API waits for the specified nodes to be excluded from the voting
configuration before returning. The period of time to wait is specified by the
?timeout
query parameter. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error. Defaults to30s
. -
wait_for_removal
-
(Optional, boolean) Specifies whether to wait for all excluded nodes to be
removed from the cluster before clearing the voting configuration exclusions
list. Defaults to
true
, meaning that all excluded nodes must be removed from the cluster before this API takes any action. If set tofalse
then the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster.
Examples
editAdds nodes named nodeName1
and nodeName2
to the voting configuration
exclusions list:
POST /_cluster/voting_config_exclusions?node_names=nodeName1,nodeName2
Remove all exclusions from the list:
DELETE /_cluster/voting_config_exclusions