Skip to content

Commit 33af77b

Browse files
authored
Mention full-cluster restart in initial_master_node docs (#112986)
Apparently some users consider "node is restarting" not to apply to a full-cluster restart. This commit further clarifies that you must not set `cluster.initial_master_nodes` in a full cluster restart.
1 parent 65076f4 commit 33af77b

File tree

4 files changed

+33
-26
lines changed

4 files changed

+33
-26
lines changed

docs/reference/modules/discovery/bootstrapping.asciidoc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Starting an Elasticsearch cluster for the very first time requires the initial
55
set of <<master-node,master-eligible nodes>> to be explicitly defined on one or
66
more of the master-eligible nodes in the cluster. This is known as _cluster
77
bootstrapping_. This is only required the first time a cluster starts up.
8-
Freshly-started nodes that are joining a running cluster obtain this
8+
Freshly-started nodes that are joining a running cluster obtain this
99
information from the cluster's elected master.
1010

1111
The initial set of master-eligible nodes is defined in the
@@ -27,17 +27,20 @@ node:
2727
if it is not possible to use the `node.name` of the node and there are
2828
multiple nodes sharing a single IP address.
2929

30+
Do not set `cluster.initial_master_nodes` on master-ineligible nodes.
31+
3032
[IMPORTANT]
3133
====
3234
After the cluster has formed, remove the `cluster.initial_master_nodes` setting
33-
from each node's configuration. It should not be set for master-ineligible
34-
nodes, master-eligible nodes joining an existing cluster, or nodes which are
35-
restarting.
36-
37-
If you leave `cluster.initial_master_nodes` in place once the cluster has
38-
formed then there is a risk that a future misconfiguration may result in
39-
bootstrapping a new cluster alongside your existing cluster. It may not be
40-
possible to recover from this situation without losing data.
35+
from each node's configuration and never set it again for this cluster. Do not
36+
configure this setting on nodes joining an existing cluster. Do not configure
37+
this setting on nodes which are restarting. Do not configure this setting when
38+
performing a full-cluster restart.
39+
40+
If you leave `cluster.initial_master_nodes` in place once the cluster has formed
41+
then there is a risk that a future misconfiguration may result in bootstrapping
42+
a new cluster alongside your existing cluster. It may not be possible to recover
43+
from this situation without losing data.
4144
====
4245

4346
The simplest way to create a new cluster is for you to select one of your

docs/reference/modules/discovery/discovery-settings.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ setting, see <<single-node-discovery>>.
4646
Sets the initial set of master-eligible nodes in a brand-new cluster. By
4747
default this list is empty, meaning that this node expects to join a cluster
4848
that has already been bootstrapped. Remove this setting once the cluster has
49-
formed. Do not use this setting when restarting nodes or when adding new nodes
50-
to an existing cluster. See <<initial_master_nodes>>.
49+
formed, and never set it again for this cluster. Do not configure this setting
50+
on master-ineligible nodes. Do not configure this setting on nodes joining an
51+
existing cluster. Do not configure this setting on nodes which are restarting.
52+
Do not configure this setting when performing a full-cluster restart. See
53+
<<initial_master_nodes>>.
5154

5255
[discrete]
5356
==== Expert settings

docs/reference/setup/bootstrap-checks.asciidoc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,9 @@ properties:
245245
- `discovery.seed_providers`
246246
- `cluster.initial_master_nodes`
247247

248-
Note that you should remove `cluster.initial_master_nodes` from the
249-
configuration after the cluster has started for the first time. Do not use this
250-
setting when restarting nodes or when adding new nodes to an existing cluster.
251-
Instead, configure `discovery.seed_hosts` or `discovery.seed_providers`. If you
252-
do not need any discovery configuration, for instance if running a single-node
253-
cluster, set `discovery.seed_hosts: []` to disable discovery and satisfy this
254-
bootstrap check.
248+
Note that you must <<initial_master_nodes,remove `cluster.initial_master_nodes`
249+
from the configuration of every node>> after the cluster has started for the
250+
first time. Instead, configure `discovery.seed_hosts` or
251+
`discovery.seed_providers`. If you do not need any discovery configuration, for
252+
instance if running a single-node cluster, set `discovery.seed_hosts: []` to
253+
disable discovery and satisfy this bootstrap check.

docs/reference/setup/important-settings/discovery-settings.asciidoc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,18 @@ first election. In <<dev-vs-prod-mode,development mode>>, with no discovery
5353
settings configured, this step is performed automatically by the nodes
5454
themselves.
5555

56-
Because auto-bootstrapping is <<modules-discovery-quorums,inherently
57-
unsafe>>, when starting a new cluster in production
58-
mode, you must explicitly list the master-eligible nodes whose votes should be
59-
counted in the very first election. You set this list using the
60-
`cluster.initial_master_nodes` setting.
56+
Because auto-bootstrapping is <<modules-discovery-quorums,inherently unsafe>>,
57+
when starting a new cluster in production mode, you must explicitly list the
58+
master-eligible nodes whose votes should be counted in the very first election.
59+
You set this list using the `cluster.initial_master_nodes` setting on every
60+
master-eligible node. Do not configure this setting on master-ineligible nodes.
6161

6262
IMPORTANT: After the cluster forms successfully for the first time, remove the
63-
`cluster.initial_master_nodes` setting from each node's configuration. Do not
64-
use this setting when restarting a cluster or adding a new node to an existing
65-
cluster.
63+
`cluster.initial_master_nodes` setting from each node's configuration and never
64+
set it again for this cluster. Do not configure this setting on nodes joining
65+
an existing cluster. Do not configure this setting on nodes which are
66+
restarting. Do not configure this setting when performing a full-cluster
67+
restart. See <<modules-discovery-bootstrap-cluster>>.
6668

6769
[source,yaml]
6870
--------------------------------------------------

0 commit comments

Comments
 (0)