| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 | [[voting-config-exclusions]]=== Voting configuration exclusions API++++<titleabbrev>Voting configuration exclusions</titleabbrev>++++Adds or removes master-eligible nodes from the<<modules-discovery-voting,voting configuration exclusion list>>.[[voting-config-exclusions-api-request]]==== {api-request-title}`POST _cluster/voting_config_exclusions?node_names=<node_names>` +`POST _cluster/voting_config_exclusions?node_ids=<node_ids>` +`DELETE _cluster/voting_config_exclusions`[[voting-config-exclusions-api-desc]]==== {api-description-title}  By default, if there are more than three master-eligible nodes in the clusterand you remove fewer than half of the master-eligible nodes in the cluster atonce, the <<modules-discovery-voting,voting configuration>> automaticallyshrinks.If you want to shrink the voting configuration to contain fewer than three nodesor 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 configurationmanually. It adds an entry for that node in the voting configuration exclusionslist. The cluster then tries to reconfigure the voting configuration to removethat node and to prevent it from returning.If the API fails, you can safely retry it.  Only a successful responseguarantees that the node has been removed from the voting configuration and willnot be reinstated.NOTE: Voting exclusions are required only when you remove at least half of themaster-eligible nodes from a cluster in a short time period. They are notrequired when removing master-ineligible nodes or fewer than half of themaster-eligible nodes.For more information, see <<modules-discovery-removing-nodes>>.[[voting-config-exclusions-api-query-params]]==== {api-query-parms-title}`node_names`::A comma-separated list of the names of the nodes to exclude from the votingconfiguration. 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 thevoting configuration. If specified, you may not also specify `?node_names`.`timeout`::(Optional, <<time-units, time units>>) When adding a voting configurationexclusion, the API waits for the specified nodes to be excluded from the votingconfiguration before returning. The period of time to wait is specified by the`?timeout` query parameter. If the timeout expires before the appropriatecondition is satisfied, the request fails and returns an error. Defaults to`30s`.`wait_for_removal`::(Optional, boolean) Specifies whether to wait for all excluded nodes to beremoved from the cluster before clearing the voting configuration exclusionslist. Defaults to `true`, meaning that all excluded nodes must be removed fromthe cluster before this API takes any action. If set to `false` then the votingconfiguration exclusions list is cleared even if some excluded nodes are stillin the cluster.  [[voting-config-exclusions-api-example]]==== {api-examples-title}Adds nodes named `nodeName1` and `nodeName2` to the voting configurationexclusions list:[source,console]-------------------------------------------------- POST /_cluster/voting_config_exclusions?node_names=nodeName1,nodeName2--------------------------------------------------Remove all exclusions from the list:[source,console]--------------------------------------------------DELETE /_cluster/voting_config_exclusions--------------------------------------------------
 |