|
| 1 | +[[voting-config-exclusions]] |
| 2 | +== Voting configuration exclusions API |
| 3 | +++++ |
| 4 | +<titleabbrev>Voting Configuration Exclusions</titleabbrev> |
| 5 | +++++ |
| 6 | + |
| 7 | +Adds or removes master-eligible nodes from the |
| 8 | +<<modules-discovery-voting,voting configuration exclusion list>>. |
| 9 | + |
| 10 | +[float] |
| 11 | +=== Request |
| 12 | + |
| 13 | +`POST _cluster/voting_config_exclusions/<node_name>` + |
| 14 | + |
| 15 | +`DELETE _cluster/voting_config_exclusions` |
| 16 | + |
| 17 | +[float] |
| 18 | +=== Path parameters |
| 19 | + |
| 20 | +`node_name`:: |
| 21 | + A <<cluster-nodes,node filter>> that identifies {es} nodes. |
| 22 | + |
| 23 | +[float] |
| 24 | +=== Description |
| 25 | + |
| 26 | +By default, if there are more than three master-eligible nodes in the cluster |
| 27 | +and you remove fewer than half of the master-eligible nodes in the cluster at |
| 28 | +once, the <<modules-discovery-voting,voting configuration>> automatically |
| 29 | +shrinks. |
| 30 | + |
| 31 | +If you want to shrink the voting configuration to contain fewer than three nodes |
| 32 | +or to remove half or more of the master-eligible nodes in the cluster at once, |
| 33 | +you must use this API to remove departed nodes from the voting configuration |
| 34 | +manually. It adds an entry for that node in the voting configuration exclusions |
| 35 | +list. The cluster then tries to reconfigure the voting configuration to remove |
| 36 | +that node and to prevent it from returning. |
| 37 | + |
| 38 | +If the API fails, you can safely retry it. Only a successful response |
| 39 | +guarantees that the node has been removed from the voting configuration and will |
| 40 | +not be reinstated. |
| 41 | + |
| 42 | +NOTE: Voting exclusions are required only when you remove at least half of the |
| 43 | +master-eligible nodes from a cluster in a short time period. They are not |
| 44 | +required when removing master-ineligible nodes or fewer than half of the |
| 45 | +master-eligible nodes. |
| 46 | + |
| 47 | +The <<modules-discovery-settings,`cluster.max_voting_config_exclusions` |
| 48 | +setting>> limits the size of the voting configuration exclusion list. The |
| 49 | +default value is `10`. Since voting configuration exclusions are persistent and |
| 50 | +limited in number, you must clear the voting config exclusions list once the |
| 51 | +exclusions are no longer required. |
| 52 | + |
| 53 | +There is also a |
| 54 | +<<modules-discovery-settings,`cluster.auto_shrink_voting_configuration` setting>>, |
| 55 | +which is set to true by default. If it is set to false, you must use this API to |
| 56 | +maintain the voting configuration. |
| 57 | + |
| 58 | +For more information, see <<modules-discovery-removing-nodes>>. |
| 59 | + |
| 60 | +[float] |
| 61 | +=== Examples |
| 62 | + |
| 63 | +Add `nodeId1` to the voting configuration exclusions list: |
| 64 | +[source,js] |
| 65 | +-------------------------------------------------- |
| 66 | +POST /_cluster/voting_config_exclusions/nodeId1 |
| 67 | +-------------------------------------------------- |
| 68 | +// CONSOLE |
| 69 | +// TEST[catch:bad_request] |
| 70 | + |
| 71 | +Remove all exclusions from the list: |
| 72 | +[source,js] |
| 73 | +-------------------------------------------------- |
| 74 | +DELETE /_cluster/voting_config_exclusions |
| 75 | +-------------------------------------------------- |
| 76 | +// CONSOLE |
0 commit comments