Files
OpenSearch/_api-reference/cluster-api/cluster-voting-configuration-exclusions.md
honeymoose f321dfedf5 同步完成!
**同步结果摘要**:

| 目录 | 同步前 | 同步后 | 官方 |
|------|--------|--------|------|
| aggregations | 40 | 65 | 64 |
| analyzers | 8 | 141 | 140 |
| api-reference | 97 | 186 | 174 |
| benchmark | 34 | 67 | 53 |
| clients | 17 | 18 | 18 |
| dashboards | 38 | 149 | 131 |
| data-prepper | 77 | 134 | 123 |
| im-plugin | 22 | 37 | 37 |
| ingest-pipelines | 27 | 52 | 51 |
| install-and-configure | 37 | 57 | 53 |
| ml-commons-plugin | 81 | 157 | 155 |
| observing-your-data | 39 | 73 | 66 |
| query-dsl | 40 | 77 | 75 |
| search-plugins | 80 | 139 | 95 |
| security-analytics | 22 | 47 | 46 |

**说明**:
- 本地文件数 > 官方:本地有一些官方已删除或重命名的文件
- 新增了约 **740 个英文文档文件**
- 已有文件保持不变(未覆盖)
2026-11-30 10:48:30 -05:00

5.7 KiB

layout, title, parent, nav_order
layout title parent nav_order
default Voting configuration exclusions Cluster APIs 75

Voting Configuration Exclusions API

Introduced 1.0 {: .label .label-purple }

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.

Endpoints

POST /_cluster/voting_config_exclusions

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.

Example

Exclude a node named opensearch-node1 from the voting configuration:

{% capture step1_rest %} POST /_cluster/voting_config_exclusions?node_names=opensearch-node1

{% endcapture %}

{% capture step1_python %}

response = client.cluster.post_voting_config_exclusions( params = { "node_names": "opensearch-node1" } )

{% endcapture %}

{% include code-block.html rest=step1_rest python=step1_python %}

Alternatively, you can specify the node IDs as a comma-separated list:

{% capture step1_rest %} POST /_cluster/voting_config_exclusions?node_ids=6ITS4DmNR7OJT1G5lyW8Lw,PEEW2S7-Su2XCA4zUE9_2Q

{% endcapture %}

{% capture step1_python %}

response = client.cluster.post_voting_config_exclusions( params = { "node_ids": "6ITS4DmNR7OJT1G5lyW8Lw,PEEW2S7-Su2XCA4zUE9_2Q" } )

{% endcapture %}

{% include code-block.html rest=step1_rest python=step1_python %}

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.

Endpoints

DELETE /_cluster/voting_config_exclusions

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)

Example

Use the following request to remove all voting configuration exclusions without waiting for nodes to be removed:

{% capture step1_rest %} DELETE /_cluster/voting_config_exclusions?wait_for_removal=false

{% endcapture %}

{% capture step1_python %}

response = client.cluster.delete_voting_config_exclusions( params = { "wait_for_removal": "false" } )

{% endcapture %}

{% include code-block.html rest=step1_rest python=step1_python %}