voting-exclusions.asciidoc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. [[voting-config-exclusions-api-request]]
  9. ==== {api-request-title}
  10. `POST _cluster/voting_config_exclusions/<node_name>` +
  11. `DELETE _cluster/voting_config_exclusions`
  12. [[voting-config-exclusions-api-desc]]
  13. ==== {api-description-title}
  14. By default, if there are more than three master-eligible nodes in the cluster
  15. and you remove fewer than half of the master-eligible nodes in the cluster at
  16. once, the <<modules-discovery-voting,voting configuration>> automatically
  17. shrinks.
  18. If you want to shrink the voting configuration to contain fewer than three nodes
  19. or to remove half or more of the master-eligible nodes in the cluster at once,
  20. you must use this API to remove departed nodes from the voting configuration
  21. manually. It adds an entry for that node in the voting configuration exclusions
  22. list. The cluster then tries to reconfigure the voting configuration to remove
  23. that node and to prevent it from returning.
  24. If the API fails, you can safely retry it. Only a successful response
  25. guarantees that the node has been removed from the voting configuration and will
  26. not be reinstated.
  27. NOTE: Voting exclusions are required only when you remove at least half of the
  28. master-eligible nodes from a cluster in a short time period. They are not
  29. required when removing master-ineligible nodes or fewer than half of the
  30. master-eligible nodes.
  31. For more information, see <<modules-discovery-removing-nodes>>.
  32. [[voting-config-exclusions-api-path-params]]
  33. ==== {api-path-parms-title}
  34. `<node_name>`::
  35. A <<cluster-nodes,node filter>> that identifies {es} nodes.
  36. [[voting-config-exclusions-api-query-params]]
  37. ==== {api-query-parms-title}
  38. `cluster.auto_shrink_voting_configuration`::
  39. (Optional, boolean) If `false`, you must use this API to maintain the voting
  40. configuration. Defaults to `true`.
  41. `cluster.max_voting_config_exclusions`::
  42. (Optional, integer) Limits the size of the voting configuration exclusion
  43. list. The default value is `10`. Since voting configuration exclusions are
  44. persistent and limited in number, you must clear the voting config
  45. exclusions list once the exclusions are no longer required.
  46. [[voting-config-exclusions-api-example]]
  47. ==== {api-examples-title}
  48. Add `nodeId1` to the voting configuration exclusions list:
  49. [source,console]
  50. --------------------------------------------------
  51. POST /_cluster/voting_config_exclusions/nodeId1
  52. --------------------------------------------------
  53. // TEST[catch:bad_request]
  54. Remove all exclusions from the list:
  55. [source,console]
  56. --------------------------------------------------
  57. DELETE /_cluster/voting_config_exclusions
  58. --------------------------------------------------