voting-exclusions.asciidoc 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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_names=<node_names>` +
  11. `POST /_cluster/voting_config_exclusions?node_ids=<node_ids>` +
  12. `DELETE /_cluster/voting_config_exclusions`
  13. [[voting-config-exclusions-api-prereqs]]
  14. ==== {api-prereq-title}
  15. * If the {es} {security-features} are enabled, you must have the `manage`
  16. <<privileges-list-cluster,cluster privilege>> to use this API.
  17. [[voting-config-exclusions-api-desc]]
  18. ==== {api-description-title}
  19. By default, if there are more than three master-eligible nodes in the cluster
  20. and you remove fewer than half of the master-eligible nodes in the cluster at
  21. once, the <<modules-discovery-voting,voting configuration>> automatically
  22. shrinks.
  23. If you want to shrink the voting configuration to contain fewer than three nodes
  24. or to remove half or more of the master-eligible nodes in the cluster at once,
  25. you must use this API to remove departed nodes from the voting configuration
  26. manually. It adds an entry for that node in the voting configuration exclusions
  27. list. The cluster then tries to reconfigure the voting configuration to remove
  28. that node and to prevent it from returning.
  29. If the API fails, you can safely retry it. Only a successful response
  30. guarantees that the node has been removed from the voting configuration and will
  31. not be reinstated.
  32. NOTE: Voting exclusions are required only when you remove at least half of the
  33. master-eligible nodes from a cluster in a short time period. They are not
  34. required when removing master-ineligible nodes or fewer than half of the
  35. master-eligible nodes.
  36. For more information, see <<modules-discovery-removing-nodes>>.
  37. [[voting-config-exclusions-api-query-params]]
  38. ==== {api-query-parms-title}
  39. `node_names`::
  40. A comma-separated list of the names of the nodes to exclude from the voting
  41. configuration. If specified, you may not also specify `?node_ids`.
  42. `node_ids`::
  43. A comma-separated list of the persistent ids of the nodes to exclude from the
  44. voting configuration. If specified, you may not also specify `?node_names`.
  45. `timeout`::
  46. (Optional, <<time-units, time units>>) When adding a voting configuration
  47. exclusion, the API waits for the specified nodes to be excluded from the voting
  48. configuration before returning. The period of time to wait is specified by the
  49. `?timeout` query parameter. If the timeout expires before the appropriate
  50. condition is satisfied, the request fails and returns an error. Defaults to
  51. `30s`.
  52. `wait_for_removal`::
  53. (Optional, Boolean) Specifies whether to wait for all excluded nodes to be
  54. removed from the cluster before clearing the voting configuration exclusions
  55. list. Defaults to `true`, meaning that all excluded nodes must be removed from
  56. the cluster before this API takes any action. If set to `false` then the voting
  57. configuration exclusions list is cleared even if some excluded nodes are still
  58. in the cluster.
  59. [[voting-config-exclusions-api-example]]
  60. ==== {api-examples-title}
  61. Adds nodes named `nodeName1` and `nodeName2` to the voting configuration
  62. exclusions list:
  63. [source,console]
  64. --------------------------------------------------
  65. POST /_cluster/voting_config_exclusions?node_names=nodeName1,nodeName2
  66. --------------------------------------------------
  67. Remove all exclusions from the list:
  68. [source,console]
  69. --------------------------------------------------
  70. DELETE /_cluster/voting_config_exclusions
  71. --------------------------------------------------