voting-exclusions.asciidoc 2.7 KB

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