| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 | [[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>>.[float]=== Request`POST _cluster/voting_config_exclusions/<node_name>` +`DELETE _cluster/voting_config_exclusions`[float]=== Path parameters`node_name`::  A <<cluster-nodes,node filter>> that identifies {es} nodes.[float]=== Description  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.The <<modules-discovery-settings,`cluster.max_voting_config_exclusions`setting>> limits the size of the voting configuration exclusion list. Thedefault value is `10`. Since voting configuration exclusions are persistent andlimited in number, you must clear the voting config exclusions list once theexclusions are no longer required.There is also a<<modules-discovery-settings,`cluster.auto_shrink_voting_configuration` setting>>,which is set to true by default. If it is set to false, you must use this API tomaintain the voting configuration.For more information, see <<modules-discovery-removing-nodes>>.[float]=== ExamplesAdd `nodeId1` to the voting configuration exclusions list:[source,js]-------------------------------------------------- POST /_cluster/voting_config_exclusions/nodeId1--------------------------------------------------// CONSOLE// TEST[catch:bad_request]Remove all exclusions from the list:[source,js]--------------------------------------------------DELETE /_cluster/voting_config_exclusions--------------------------------------------------// CONSOLE
 |