Skip to content

Commit 8e618fd

Browse files
committed
Adjust docs for voting config exclusions API (#55006)
In #50836 we deprecated the existing voting config exclusions API and added a new one. This commit adjust the docs to match.
1 parent 9eddd2b commit 8e618fd

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

docs/reference/cluster/voting-exclusions.asciidoc

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Adds or removes master-eligible nodes from the
1111
[[voting-config-exclusions-api-request]]
1212
==== {api-request-title}
1313

14-
`POST _cluster/voting_config_exclusions/<node_name>` +
14+
`POST _cluster/voting_config_exclusions?node_names=<node_names>` +
15+
16+
`POST _cluster/voting_config_exclusions?node_ids=<node_ids>` +
1517

1618
`DELETE _cluster/voting_config_exclusions`
1719

@@ -42,39 +44,43 @@ master-eligible nodes.
4244

4345
For more information, see <<modules-discovery-removing-nodes>>.
4446

45-
46-
[[voting-config-exclusions-api-path-params]]
47-
==== {api-path-parms-title}
48-
49-
`<node_name>`::
50-
A <<cluster-nodes,node filter>> that identifies {es} nodes.
51-
52-
5347
[[voting-config-exclusions-api-query-params]]
5448
==== {api-query-parms-title}
5549

56-
`cluster.auto_shrink_voting_configuration`::
57-
(Optional, boolean) If `false`, you must use this API to maintain the voting
58-
configuration. Defaults to `true`.
59-
60-
`cluster.max_voting_config_exclusions`::
61-
(Optional, integer) Limits the size of the voting configuration exclusion
62-
list. The default value is `10`. Since voting configuration exclusions are
63-
persistent and limited in number, you must clear the voting config
64-
exclusions list once the exclusions are no longer required.
65-
50+
`node_names`::
51+
A comma-separated list of the names of the nodes to exclude from the voting
52+
configuration. If specified, you may not also specify `?node_ids`.
53+
54+
`node_ids`::
55+
A comma-separated list of the persistent ids of the nodes to exclude from the
56+
voting configuration. If specified, you may not also specify `?node_names`.
57+
58+
`timeout`::
59+
(Optional, <<time-units, time units>>) When adding a voting configuration
60+
exclusion, the API waits for the specified nodes to be excluded from the voting
61+
configuration before returning. The period of time to wait is specified by the
62+
`?timeout` query parameter. If the timeout expires before the appropriate
63+
condition is satisfied, the request fails and returns an error. Defaults to
64+
`30s`.
65+
66+
`wait_for_removal`::
67+
(Optional, boolean) Specifies whether to wait for all excluded nodes to be
68+
removed from the cluster before clearing the voting configuration exclusions
69+
list. Defaults to `true`, meaning that all excluded nodes must be removed from
70+
the cluster before this API takes any action. If set to `false` then the voting
71+
configuration exclusions list is cleared even if some excluded nodes are still
72+
in the cluster.
6673

6774
[[voting-config-exclusions-api-example]]
6875
==== {api-examples-title}
6976

70-
Add `nodeId1` to the voting configuration exclusions list:
77+
Adds nodes named `nodeName1` and `nodeName2` to the voting configuration
78+
exclusions list:
7179

7280
[source,console]
7381
--------------------------------------------------
74-
POST /_cluster/voting_config_exclusions/nodeId1
82+
POST /_cluster/voting_config_exclusions?node_names=nodeName1,nodeName2
7583
--------------------------------------------------
76-
// TEST[catch:bad_request]
77-
7884

7985
Remove all exclusions from the list:
8086

docs/reference/modules/discovery/adding-removing-nodes.asciidoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,22 @@ to the voting configuration exclusion list using the
6565
# Add node to voting configuration exclusions list and wait for the system
6666
# to auto-reconfigure the node out of the voting configuration up to the
6767
# default timeout of 30 seconds
68-
POST /_cluster/voting_config_exclusions/node_name
68+
POST /_cluster/voting_config_exclusions?node_names=node_name
6969
7070
# Add node to voting configuration exclusions list and wait for
7171
# auto-reconfiguration up to one minute
72-
POST /_cluster/voting_config_exclusions/node_name?timeout=1m
72+
POST /_cluster/voting_config_exclusions?node_names=node_name&timeout=1m
7373
--------------------------------------------------
7474
// TEST[skip:this would break the test cluster if executed]
7575

76-
The node that should be added to the exclusions list is specified using
77-
<<cluster-nodes,node filters>> in place of `node_name` here. If a call to the
78-
voting configuration exclusions API fails, you can safely retry it. Only a
79-
successful response guarantees that the node has actually been removed from the
80-
voting configuration and will not be reinstated. If it's the active master that
81-
was removed from the voting configuration, then it will abdicate to another
82-
master-eligible node that's still in the voting configuration, if such a node
83-
is available.
76+
The nodes that should be added to the exclusions list are specified by name
77+
using the `?node_names` query parameter, or by their persistent node IDs using
78+
the `?node_ids` query parameter. If a call to the voting configuration
79+
exclusions API fails, you can safely retry it. Only a successful response
80+
guarantees that the node has actually been removed from the voting configuration
81+
and will not be reinstated. If the elected master node is excluded from the
82+
voting configuration then it will abdicate to another master-eligible node that
83+
is still in the voting configuration if such a node is available.
8484

8585
Although the voting configuration exclusions API is most useful for down-scaling
8686
a two-node to a one-node cluster, it is also possible to use it to remove
@@ -119,7 +119,7 @@ operation.
119119
If a node is excluded from the voting configuration because it is to be shut
120120
down permanently, its exclusion can be removed after it is shut down and removed
121121
from the cluster. Exclusions can also be cleared if they were created in error
122-
or were only required temporarily:
122+
or were only required temporarily by specifying `?wait_for_removal=false`.
123123

124124
[source,console]
125125
--------------------------------------------------

0 commit comments

Comments
 (0)