Browse Source

Node names in bootstrap config have no ports (#41569)

In cases where node names and transport addresses can be muddled, it is unclear
that `cluster.initial_master_nodes: master-a:9300` means to look for a node
called `master-a:9300` rather than a node called `master-a` with transport port
`9300`. This commit adds docs to that effect.
David Turner 6 years ago
parent
commit
1e762a137e

+ 20 - 9
docs/reference/modules/discovery/bootstrapping.asciidoc

@@ -10,11 +10,22 @@ data folder and freshly-started nodes that are joining an existing cluster
 obtain this information from the cluster's elected master. 
 
 The initial set of master-eligible nodes is defined in the
-<<initial_master_nodes,`cluster.initial_master_nodes` setting>>. This is a list
-of the <<node.name,node names>> or IP addresses of the master-eligible nodes in
-the new cluster. If you do not configure `node.name` then it is set to the
-node's hostname, so in this case you can use hostnames in
-`cluster.initial_master_nodes` too.
+<<initial_master_nodes,`cluster.initial_master_nodes` setting>>. This should be
+set to a list containing one of the following items for each master-eligible
+node:
+
+- The <<node.name,node name>> of the node.
+- The node's hostname if `node.name` is not set, because `node.name` defaults
+  to the node's hostname. You must use either the fully-qualified hostname or
+  the bare hostname <<modules-discovery-bootstrap-cluster-fqdns,depending on
+  your system configuration>>.
+- The IP address of the node's <<modules-transport,publish address>>, if it is
+  not possible to use the `node.name` of the node. This is normally the IP
+  address to which <<common-network-settings,`network.host`>> resolves but
+  <<advanced-network-settings,this can be overridden>>.
+- The IP address and port of the node's publish address, in the form `IP:PORT`,
+  if it is not possible to use the `node.name` of the node and there are
+  multiple nodes sharing a single IP address.
 
 When you start a master-eligible node, you can provide this setting on the
 command line or in the `elasticsearch.yml` file. After the cluster has formed,
@@ -47,9 +58,9 @@ cluster.initial_master_nodes:
   - master-c
 --------------------------------------------------
 
-You can use a mix of IP addresses and node names too. If there is more than one
-Elasticsearch node with the same IP address then the transport port must also
-be given to specify exactly which node is meant:
+If it is not possible to use the names of the nodes then you can also use IP
+addresses, or IP addresses and ports, or even a mix of IP addresses and node
+names:
 
 [source,yaml]
 --------------------------------------------------
@@ -57,7 +68,7 @@ cluster.initial_master_nodes:
   - 10.0.10.101
   - 10.0.10.102:9300
   - 10.0.10.102:9301
-  - master-node-hostname
+  - master-node-name
 --------------------------------------------------
 
 Like all node settings, it is also possible to specify the initial set of master

+ 12 - 15
docs/reference/setup/important-settings/discovery-settings.asciidoc

@@ -49,26 +49,23 @@ discovery.seed_hosts:
    - 192.168.1.10:9300
    - 192.168.1.11 <1>
    - seeds.mydomain.com <2>
-cluster.initial_master_nodes:
-   - master-node-a <3>
-   - 192.168.1.12 <4>
-   - 192.168.1.13:9301 <5>
+cluster.initial_master_nodes: <3>
+   - master-node-a
+   - master-node-b
+   - master-node-c
 --------------------------------------------------
 <1> The port will default to `transport.profiles.default.port` and fallback to
     `transport.port` if not specified.
 <2> If a hostname resolves to multiple IP addresses then the node will attempt to
     discover other nodes at all resolved addresses.
-<3> Initial master nodes can be identified by their <<node.name,`node.name`>>,
-    which defaults to the hostname. Make sure that the value in
-    `cluster.initial_master_nodes` matches the `node.name` exactly. If you use
-    a fully-qualified domain name such as `master-node-a.example.com` for your
-    node names then you must use the fully-qualified name in this list;
-    conversely if `node.name` is a bare hostname without any trailing
-    qualifiers then you must also omit the trailing qualifiers in
-    `cluster.initial_master_nodes`.
-<4> Initial master nodes can also be identified by their IP address.
-<5> If multiple master nodes share an IP address then the transport port must
-    be used to distinguish between them.
+<3> The initial master nodes should be identified by their
+    <<node.name,`node.name`>>, which defaults to their hostname. Make sure that
+    the value in `cluster.initial_master_nodes` matches the `node.name`
+    exactly. If you use a fully-qualified domain name such as
+    `master-node-a.example.com` for your node names then you must use the
+    fully-qualified name in this list; conversely if `node.name` is a bare
+    hostname without any trailing qualifiers then you must also omit the
+    trailing qualifiers in `cluster.initial_master_nodes`.
 
 For more information, see <<modules-discovery-bootstrap-cluster>> and
 <<modules-discovery-settings>>.