-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOCS] Adds overview and API ref for cluster voting configurations #36954
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2368b16
[DOCS] Adds overview and API ref for voting configurations
lcawl 8fc6112
[DOCS] Removes redundant sections
lcawl 419b48e
[DOCS] Adds the shrink setting
lcawl 5b608a9
Some suggested changes
DaveCTurner 6f8d374
[DOCS] Downplays cluster.auto_shrink_voting_configuration
lcawl 77130e8
[DOCS] More small edits
lcawl 1da744f
[DOCS] Fixes code snippet failure
lcawl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
[[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 cluster | ||
and you remove fewer than half of the master-eligible nodes in the cluster at | ||
once, the <<modules-discovery-voting,voting configuration>> automatically | ||
shrinks. | ||
|
||
If you want to shrink the voting configuration to contain fewer than three nodes | ||
or 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 configuration | ||
manually. It adds an entry for that node in the voting configuration exclusions | ||
list. The cluster then tries to reconfigure the voting configuration to remove | ||
that node and to prevent it from returning. | ||
|
||
If the API fails, you can safely retry it. Only a successful response | ||
guarantees that the node has been removed from the voting configuration and will | ||
not be reinstated. | ||
|
||
NOTE: Voting exclusions are required only when you remove at least half of the | ||
master-eligible nodes from a cluster in a short time period. They are not | ||
required when removing master-ineligible nodes or fewer than half of the | ||
master-eligible nodes. | ||
|
||
The <<modules-discovery-settings,`cluster.max_voting_config_exclusions` | ||
setting>> limits the size of the voting configuration exclusion list. The | ||
default value is `10`. Since voting configuration exclusions are persistent and | ||
limited in number, you must clear the voting config exclusions list once the | ||
exclusions 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 to | ||
maintain the voting configuration. | ||
|
||
For more information, see <<modules-discovery-removing-nodes>>. | ||
|
||
[float] | ||
=== Examples | ||
|
||
Add `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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,16 @@ module. This module is divided into the following sections: | |
unknown, such as when a node has just started up or when the previous | ||
master has failed. | ||
|
||
<<modules-discovery-quorums>>:: | ||
|
||
This section describes how {es} uses a quorum-based voting mechanism to | ||
make decisions even if some nodes are unavailable. | ||
|
||
<<modules-discovery-voting>>:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this entry. |
||
|
||
This section describes the concept of voting configurations, which {es} | ||
automatically updates as nodes leave and join the cluster. | ||
|
||
<<modules-discovery-bootstrap-cluster>>:: | ||
|
||
Bootstrapping a cluster is required when an Elasticsearch cluster starts up | ||
|
@@ -40,26 +50,27 @@ module. This module is divided into the following sections: | |
Cluster state publishing is the process by which the elected master node | ||
updates the cluster state on all the other nodes in the cluster. | ||
|
||
<<modules-discovery-quorums>>:: | ||
<<cluster-fault-detection>>:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be here, for completeness. |
||
|
||
{es} performs health checks to detect and remove faulty nodes. | ||
|
||
This section describes the detailed design behind the master election and | ||
auto-reconfiguration logic. | ||
|
||
<<modules-discovery-settings,Settings>>:: | ||
|
||
There are settings that enable users to influence the discovery, cluster | ||
formation, master election and fault detection processes. | ||
|
||
include::discovery/discovery.asciidoc[] | ||
|
||
include::discovery/quorums.asciidoc[] | ||
|
||
include::discovery/voting.asciidoc[] | ||
|
||
include::discovery/bootstrapping.asciidoc[] | ||
|
||
include::discovery/adding-removing-nodes.asciidoc[] | ||
|
||
include::discovery/publishing.asciidoc[] | ||
|
||
include::discovery/quorums.asciidoc[] | ||
|
||
include::discovery/fault-detection.asciidoc[] | ||
|
||
include::discovery/discovery-settings.asciidoc[] | ||
include::discovery/discovery-settings.asciidoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the capitalisation of this title to match the other sections under 'Cluster APIs'.