-
Notifications
You must be signed in to change notification settings - Fork 578
adding voting_configuration_exclusion-api-docs #10159
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
Open
AntonEliatra
wants to merge
5
commits into
opensearch-project:main
Choose a base branch
from
AntonEliatra:adding-voting_config_exclusions-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a9b2611
adding voting_configuration_exclusion-api-docs
AntonEliatra 7d51e38
Update cluster-voting-configuration-exclusions.md
AntonEliatra 405f25b
Apply suggestions from code review
AntonEliatra 4c76a1f
Update cluster-voting-configuration-exclusions.md
AntonEliatra 392a407
Apply suggestions from code review
natebower 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
104 changes: 104 additions & 0 deletions
104
_api-reference/cluster-api/cluster-voting-configuration-exclusions.md
This file contains hidden or 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,104 @@ | ||
--- | ||
layout: default | ||
title: Voting configuration exclusions | ||
parent: Cluster APIs | ||
nav_order: 75 | ||
--- | ||
|
||
# Voting configuration exclusions | ||
|
||
The `_cluster/voting_config_exclusions` API allows you to exclude one or more nodes from the voting configuration. This is useful when you want to safely remove cluster-manager-eligible nodes from the cluster or to change the current cluster manager. | ||
|
||
## Adding voting configuration exclusions | ||
|
||
Use the POST method to add voting configuration exclusions. | ||
|
||
|
||
<!-- spec_insert_start | ||
api: cluster.post_voting_config_exclusions | ||
component: endpoints | ||
--> | ||
## Endpoints | ||
```json | ||
POST /_cluster/voting_config_exclusions | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.post_voting_config_exclusions | ||
component: query_parameters | ||
include_global: false | ||
include_deprecated: false | ||
columns: Parameter, Data type, Description | ||
pretty: true | ||
--> | ||
## Query parameters | ||
|
||
The following table lists the available query parameters. All query parameters are optional. | ||
|
||
| Parameter | Data type | Description | | ||
|:-------------|:---------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `node_ids` | List or String | A comma-separated list of node IDs to exclude from the voting configuration. When using this setting, you cannot also specify `node_names`. Either `node_ids` or `node_names` is required in order to receive a valid response. | | ||
| `node_names` | List or String | A comma-separated list of node names to exclude from the voting configuration. When using this setting, you cannot also specify `node_ids`. Either `node_ids` or `node_names` is required in order to receive a valid response. | | ||
| `timeout` | String | When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning a response. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error. | | ||
|
||
<!-- spec_insert_end --> | ||
|
||
## Example | ||
|
||
Exclude a node named `opensearch-node1` from the voting configuration: | ||
|
||
```json | ||
POST /_cluster/voting_config_exclusions?node_names=opensearch-node1 | ||
``` | ||
{% include copy-curl.html %} | ||
|
||
Alternatively, you can specify the node IDs as a comma-separated list: | ||
|
||
```json | ||
POST /_cluster/voting_config_exclusions?node_ids=6ITS4DmNR7OJT1G5lyW8Lw,PEEW2S7-Su2XCA4zUE9_2Q | ||
``` | ||
{% include copy-curl.html %} | ||
|
||
## Removing voting configuration exclusions | ||
|
||
Use the DELETE method to clear the list of nodes that were previously excluded from the voting configuration. This is typically used after excluded nodes have been safely removed or replaced. You can optionally wait for the nodes to be removed from the cluster before clearing the exclusions. | ||
|
||
<!-- spec_insert_start | ||
api: cluster.delete_voting_config_exclusions | ||
component: endpoints | ||
--> | ||
## Endpoints | ||
|
||
```json | ||
DELETE /_cluster/voting_config_exclusions | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.delete_voting_config_exclusions | ||
component: query_parameters | ||
include_global: false | ||
include_deprecated: false | ||
columns: Parameter, Data type, Description | ||
pretty: true | ||
--> | ||
## Query parameters | ||
|
||
The following table lists the available query parameters. All query parameters are optional. | ||
|
||
| Parameter | Data type | Description | | ||
|:-------------------|:----------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `wait_for_removal` | Boolean | Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. When `true`, all excluded nodes are removed from the cluster before this API takes any action. When `false`, the voting configuration exclusions list is cleared even if some excluded nodes are still present in the cluster. _(Default: `true`)_ | | ||
|
||
<!-- spec_insert_end --> | ||
|
||
## Example | ||
|
||
Use the following request to remove all voting configuration exclusions without waiting for nodes to be removed: | ||
|
||
```json | ||
DELETE /_cluster/voting_config_exclusions?wait_for_removal=false | ||
``` | ||
{% include copy-curl.html %} | ||
|
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.
Uh oh!
There was an error while loading. Please reload this page.