Skip to content

Commit 2d114a0

Browse files
authored
Rename static Zen1 settings (#38333)
Renames the following settings to remove the mention of `zen` in their names: - `discovery.zen.hosts_provider` -> `discovery.seed_providers` - `discovery.zen.ping.unicast.concurrent_connects` -> `discovery.seed_resolver.max_concurrent_resolvers` - `discovery.zen.ping.unicast.hosts.resolve_timeout` -> `discovery.seed_resolver.timeout` - `discovery.zen.ping.unicast.hosts` -> `discovery.seed_addresses`
1 parent 89feaa0 commit 2d114a0

File tree

44 files changed

+348
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+348
-155
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@ class ClusterFormationTasks {
131131
writeConfigSetup = { Map esConfig ->
132132
if (config.getAutoSetHostsProvider()) {
133133
// Don't force discovery provider if one is set by the test cluster specs already
134-
if (esConfig.containsKey('discovery.zen.hosts_provider') == false) {
135-
esConfig['discovery.zen.hosts_provider'] = 'file'
134+
final String seedProvidersSettingName =
135+
node.nodeVersion.onOrAfter("7.0.0") ? "discovery.seed_providers" : "discovery.zen.hosts_provider";
136+
if (esConfig.containsKey(seedProvidersSettingName) == false) {
137+
esConfig[seedProvidersSettingName] = 'file'
136138
}
137-
esConfig['discovery.zen.ping.unicast.hosts'] = []
139+
esConfig[node.nodeVersion.onOrAfter("7.0.0") ? "discovery.seed_hosts" : "discovery.zen.ping.unicast.hosts"] = []
138140
}
139141
boolean supportsInitialMasterNodes = hasBwcNodes == false || config.bwcVersion.onOrAfter("7.0.0")
140142
if (esConfig['discovery.type'] == null && config.getAutoSetInitialMasterNodes() && supportsInitialMasterNodes) {

distribution/src/config/elasticsearch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ ${path.logs}
6262
#
6363
# --------------------------------- Discovery ----------------------------------
6464
#
65-
# Pass an initial list of hosts to perform discovery when new node is started:
65+
# Pass an initial list of hosts to perform discovery when this node is started:
6666
# The default list of hosts is ["127.0.0.1", "[::1]"]
6767
#
68-
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
68+
#discovery.seed_hosts: ["host1", "host2"]
6969
#
7070
# Bootstrap the cluster using an initial set of master-eligible nodes:
7171
#

docs/plugins/discovery-azure-classic.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cloud:
3030
type: pkcs12
3131
3232
discovery:
33-
zen.hosts_provider: azure
33+
seed_providers: azure
3434
----
3535

3636
[IMPORTANT]

docs/plugins/discovery-ec2.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ provider for Zen discovery to `ec2`:
2020

2121
[source,yaml]
2222
----
23-
discovery.zen.hosts_provider: ec2
23+
discovery.seed_providers: ec2
2424
----
2525

2626
==== Settings

docs/plugins/discovery-gce.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cloud:
1919
project_id: <your-google-project-id>
2020
zone: <your-zone>
2121
discovery:
22-
zen.hosts_provider: gce
22+
seed_providers: gce
2323
--------------------------------------------------
2424

2525
The following gce settings (prefixed with `cloud.gce`) are supported:
@@ -232,7 +232,7 @@ cloud:
232232
project_id: es-cloud
233233
zone: europe-west1-a
234234
discovery:
235-
zen.hosts_provider: gce
235+
seed_providers: gce
236236
--------------------------------------------------
237237

238238

@@ -346,7 +346,7 @@ cloud:
346346
project_id: <your-google-project-id>
347347
zone: ["<your-zone1>", "<your-zone2>"]
348348
discovery:
349-
zen.hosts_provider: gce
349+
seed_providers: gce
350350
--------------------------------------------------
351351

352352

@@ -382,7 +382,7 @@ cloud:
382382
project_id: es-cloud
383383
zone: europe-west1-a
384384
discovery:
385-
zen.hosts_provider: gce
385+
seed_providers: gce
386386
gce:
387387
tags: elasticsearch, dev
388388
--------------------------------------------------
@@ -497,7 +497,7 @@ cloud:
497497
project_id: es-cloud
498498
zone: europe-west1-a
499499
discovery:
500-
zen.hosts_provider: gce
500+
seed_providers: gce
501501
--------------------------------------------------
502502

503503
Replaces `project_id` and `zone` with your settings.

docs/reference/migration/migrate_7_0/discovery.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ Production deployments of Elasticsearch now require at least one of the
3535
following settings to be specified in the `elasticsearch.yml` configuration
3636
file:
3737

38-
- `discovery.zen.ping.unicast.hosts`
39-
- `discovery.zen.hosts_provider`
38+
- `discovery.seed_hosts`
39+
- `discovery.seed_providers`
4040
- `cluster.initial_master_nodes`

docs/reference/modules/discovery/bootstrapping.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ If any of the following settings are configured then auto-bootstrapping will not
9494
take place, and you must configure `cluster.initial_master_nodes` as described
9595
in the <<modules-discovery-bootstrap-cluster,section on cluster bootstrapping>>:
9696

97-
* `discovery.zen.hosts_provider`
98-
* `discovery.zen.ping.unicast.hosts`
97+
* `discovery.seed_providers`
98+
* `discovery.seed_hosts`
9999
* `cluster.initial_master_nodes`

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ Discovery and cluster formation are affected by the following settings:
105105
`discovery.cluster_formation_warning_timeout`::
106106

107107
Sets how long a node will try to form a cluster before logging a warning
108-
that the cluster did not form. Defaults to `10s`. If a cluster has not
108+
that the cluster did not form. Defaults to `10s`. If a cluster has not
109109
formed after `discovery.cluster_formation_warning_timeout` has elapsed then
110-
the node will log a warning message that starts with the phrase `master not discovered` which describes the current state of the discovery process.
110+
the node will log a warning message that starts with the phrase `master not
111+
discovered` which describes the current state of the discovery process.
111112

112113
`discovery.find_peers_interval`::
113114

@@ -128,9 +129,9 @@ Discovery and cluster formation are affected by the following settings:
128129
Sets how long a node will wait after asking its peers again before
129130
considering the request to have failed. Defaults to `3s`.
130131

131-
`discovery.zen.hosts_provider`::
132-
Specifies which type of <<built-in-hosts-providers,hosts provider>> provides
133-
the list of seed nodes. By default, it is the
132+
`discovery.seed_providers`::
133+
Specifies which types of <<built-in-hosts-providers,seed provider>> provide
134+
the addresses of seed nodes. By default, it is the
134135
<<settings-based-hosts-provider,settings-based hosts provider>>.
135136

136137
[[no-master-block]]`discovery.zen.no_master_block`::
@@ -157,15 +158,20 @@ APIs are not be blocked and can run on any available node.
157158
===============================
158159
--
159160

160-
`discovery.zen.ping.unicast.hosts`::
161+
`discovery.seed_hosts`::
161162

162163
Provides a list of master-eligible nodes in the cluster. The list contains
163164
either an array of hosts or a comma-delimited string. Each value has the
164165
format `host:port` or `host`, where `port` defaults to the setting
165166
`transport.profiles.default.port`. Note that IPv6 hosts must be bracketed.
166167
The default value is `127.0.0.1, [::1]`. See <<unicast.hosts>>.
167168

168-
`discovery.zen.ping.unicast.hosts.resolve_timeout`::
169+
`discovery.seed_resolver.timeout`::
169170

170171
Sets the amount of time to wait for DNS lookups on each round of discovery.
171172
This is specified as a <<time-units, time unit>> and defaults to `5s`.
173+
174+
`discovery.seed_resolver.max_concurrent_resolvers`::
175+
176+
Sets the number of threads with which to perform DNS lookups for seed nodes.
177+
This defaults to `10`.

docs/reference/modules/discovery/discovery.asciidoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ By default the cluster formation module offers two hosts providers to configure
3434
the list of seed nodes: a _settings_-based and a _file_-based hosts provider.
3535
It can be extended to support cloud environments and other forms of hosts
3636
providers via {plugins}/discovery.html[discovery plugins]. Hosts providers are
37-
configured using the `discovery.zen.hosts_provider` setting, which defaults to
37+
configured using the `discovery.seed_providers` setting, which defaults to
3838
the _settings_-based hosts provider. Multiple hosts providers can be specified
3939
as a list.
4040

@@ -49,12 +49,12 @@ round of discovery. Note that if you are in an environment where DNS resolutions
4949
vary with time, you might need to adjust your <<networkaddress-cache-ttl,JVM
5050
security settings>>.
5151

52-
The list of hosts is set using the <<unicast.hosts,`discovery.zen.ping.unicast.hosts`>> static
52+
The list of hosts is set using the <<unicast.hosts,`discovery.seed_hosts`>> static
5353
setting. For example:
5454

5555
[source,yaml]
5656
--------------------------------------------------
57-
discovery.zen.ping.unicast.hosts:
57+
discovery.seed_hosts:
5858
- 192.168.1.10:9300
5959
- 192.168.1.11 <1>
6060
- seeds.mydomain.com <2>
@@ -64,9 +64,9 @@ discovery.zen.ping.unicast.hosts:
6464
<2> A hostname that resolves to multiple IP addresses will try all resolved
6565
addresses.
6666

67-
Additionally, the `discovery.zen.ping.unicast.hosts.resolve_timeout` configures
68-
the amount of time to wait for DNS lookups on each round of discovery. This is
69-
specified as a <<time-units, time unit>> and defaults to 5s.
67+
Additionally, the `discovery.seed_resolver.timeout` configures the amount of
68+
time to wait for DNS lookups on each round of discovery. This is specified as a
69+
<<time-units, time unit>> and defaults to 5s.
7070

7171
Unicast discovery uses the <<modules-transport,transport>> module to perform the
7272
discovery.
@@ -87,21 +87,21 @@ in the `elasticsearch.yml` file:
8787

8888
[source,yml]
8989
----------------------------------------------------------------
90-
discovery.zen.hosts_provider: file
90+
discovery.seed_providers: file
9191
----------------------------------------------------------------
9292

9393
Then create a file at `$ES_PATH_CONF/unicast_hosts.txt` in the format described
9494
below. Any time a change is made to the `unicast_hosts.txt` file the new changes
9595
will be picked up by Elasticsearch and the new hosts list will be used.
9696

9797
Note that the file-based discovery plugin augments the unicast hosts list in
98-
`elasticsearch.yml`. If there are valid unicast host entries in
99-
`discovery.zen.ping.unicast.hosts`, they are used in addition to those
100-
supplied in `unicast_hosts.txt`.
98+
`elasticsearch.yml`. If there are valid seed addresses in
99+
`discovery.seed_hosts` then they are used in addition to those supplied in
100+
`unicast_hosts.txt`.
101101

102-
The `discovery.zen.ping.unicast.hosts.resolve_timeout` setting also applies to
103-
DNS lookups for nodes specified by address via file-based discovery. This is
104-
specified as a <<time-units, time unit>> and defaults to 5s.
102+
The `discovery.seed_resolver.timeout` setting also applies to DNS lookups for
103+
seed addresses given via file-based discovery. This is specified as a
104+
<<time-units, time unit>> and defaults to 5s.
105105

106106
The format of the file is to specify one node entry per line. Each node entry
107107
consists of the host (host name or IP address) and an optional transport port
@@ -123,7 +123,7 @@ the default port:
123123
----------------------------------------------------------------
124124

125125
Host names are allowed instead of IP addresses (similar to
126-
`discovery.zen.ping.unicast.hosts`), and IPv6 addresses must be specified in
126+
`discovery.seed_hosts`), and IPv6 addresses must be specified in
127127
brackets with the port coming after the brackets.
128128

129129
You can also add comments to this file. All comments must appear on

docs/reference/modules/network.asciidoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,18 @@ because `:` is a special character in YAML.
2828
+
2929
Defaults to `_local_`.
3030

31-
`discovery.zen.ping.unicast.hosts`::
31+
`discovery.seed_hosts`::
3232

3333
In order to join a cluster, a node needs to know the hostname or IP address of
3434
at least some of the other nodes in the cluster. This setting provides the
35-
initial list of other nodes that this node will try to contact. Accepts IP
36-
addresses or hostnames. If a hostname lookup resolves to multiple IP
37-
addresses then each IP address will be used for discovery.
35+
initial list of addresses this node will try to contact. Accepts IP addresses
36+
or hostnames. If a hostname lookup resolves to multiple IP addresses then each
37+
IP address will be used for discovery.
3838
https://en.wikipedia.org/wiki/Round-robin_DNS[Round robin DNS] -- returning a
3939
different IP from a list on each lookup -- can be used for discovery; non-
40-
existent IP addresses will throw exceptions and cause another DNS lookup
41-
on the next round of pinging (subject to JVM DNS caching).
42-
+
43-
Defaults to `["127.0.0.1", "[::1]"]`.
40+
existent IP addresses will throw exceptions and cause another DNS lookup on the
41+
next round of pinging (subject to JVM DNS caching). + Defaults to
42+
`["127.0.0.1", "[::1]"]`.
4443

4544
`http.port`::
4645

docs/reference/security/securing-communications/configuring-tls-docker.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ services:
136136
image: {docker-image}
137137
environment:
138138
- node.name=es02
139-
- discovery.zen.ping.unicast.hosts=es01
139+
- discovery.seed_hosts=es01
140140
- cluster.initial_master_nodes=es01,es02
141141
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
142142
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"

docs/reference/setup/bootstrap-checks.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,6 @@ This bootstrap check ensures that discovery is not running with the default
252252
configuration. It can be satisfied by setting at least one of the following
253253
properties:
254254

255-
- `discovery.zen.ping.unicast.hosts`
256-
- `discovery.zen.hosts_provider`
255+
- `discovery.seed_hosts`
256+
- `discovery.seed_providers`
257257
- `cluster.initial_master_nodes`

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ each other and elect a master node.
1010

1111
[float]
1212
[[unicast.hosts]]
13-
==== `discovery.zen.ping.unicast.hosts`
13+
==== `discovery.seed_hosts`
1414

1515
Out of the box, without any network configuration, Elasticsearch will bind to
1616
the available loopback addresses and will scan local ports 9300 to 9305 to try
1717
to connect to other nodes running on the same server. This provides an auto-
1818
clustering experience without having to do any configuration.
1919

2020
When the moment comes to form a cluster with nodes on other servers, you must
21-
use the `discovery.zen.ping.unicast.hosts` setting to provide a seed list of
21+
use the `discovery.seed_hosts` setting to provide a seed list of
2222
other nodes in the cluster that are master-eligible and likely to be live and
2323
contactable. This setting should normally contain the addresses of all the
2424
master-eligible nodes in the cluster.
@@ -44,7 +44,7 @@ This list is set using the `cluster.initial_master_nodes` setting.
4444

4545
[source,yaml]
4646
--------------------------------------------------
47-
discovery.zen.ping.unicast.hosts:
47+
discovery.seed_hosts:
4848
- 192.168.1.10:9300
4949
- 192.168.1.11 <1>
5050
- seeds.mydomain.com <2>
@@ -62,4 +62,4 @@ cluster.initial_master_nodes:
6262
<5> If multiple master nodes share an IP address then the port must be used to
6363
disambiguate them.
6464

65-
For more information, see <<modules-discovery-settings>>.
65+
For more information, see <<modules-discovery-settings>>.

docs/reference/setup/install/docker.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ services:
187187
container_name: es02
188188
environment:
189189
- node.name=es02
190-
- discovery.zen.ping.unicast.hosts=es01
190+
- discovery.seed_hosts=es01
191191
- cluster.initial_master_nodes=es01,es02
192192
- cluster.name=docker-cluster
193193
- bootstrap.memory_lock=true

plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AbstractAzureComputeServiceTestCase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import java.util.concurrent.ConcurrentHashMap;
5050

5151
import static org.elasticsearch.common.util.CollectionUtils.newSingletonArrayList;
52+
import static org.elasticsearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING;
5253

5354
public abstract class AbstractAzureComputeServiceTestCase extends ESIntegTestCase {
5455

@@ -63,7 +64,7 @@ public void clearAzureNodes() {
6364
protected Settings nodeSettings(int nodeOrdinal) {
6465
Settings.Builder builder = Settings.builder()
6566
.put(super.nodeSettings(nodeOrdinal))
66-
.put("discovery.zen.hosts_provider", "azure");
67+
.put(DISCOVERY_SEED_PROVIDERS_SETTING.getKey(), "azure");
6768

6869
// We add a fake subscription_id to start mock compute service
6970
builder.put(Management.SUBSCRIPTION_ID_SETTING.getKey(), "fake")

plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryClusterFormationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
116116
throw new RuntimeException(e);
117117
}
118118
return Settings.builder().put(super.nodeSettings(nodeOrdinal))
119-
.put(DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING.getKey(), AzureDiscoveryPlugin.AZURE)
119+
.put(DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING.getKey(), AzureDiscoveryPlugin.AZURE)
120120
.put(Environment.PATH_LOGS_SETTING.getKey(), resolve)
121121
.put(TransportSettings.PORT.getKey(), 0)
122122
.put(Node.WRITE_PORTS_FILE_SETTING.getKey(), "true")

plugins/discovery-ec2/qa/amazon-ec2/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ integTestCluster {
5454
plugin ':plugins:discovery-ec2'
5555
keystoreSetting 'discovery.ec2.access_key', 'ec2_integration_test_access_key'
5656
keystoreSetting 'discovery.ec2.secret_key', 'ec2_integration_test_secret_key'
57-
setting 'discovery.zen.hosts_provider', 'ec2'
57+
setting 'discovery.seed_providers', 'ec2'
5858
setting 'network.host', '_ec2_'
5959
setting 'discovery.ec2.endpoint', "http://${-> ec2Fixture.addressAndPort}"
6060
systemProperty "com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", "http://${-> ec2Fixture.addressAndPort}"

plugins/discovery-ec2/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryUpdateSettingsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
public class Ec2DiscoveryUpdateSettingsTests extends AbstractAwsTestCase {
3939
public void testMinimumMasterNodesStart() {
4040
Settings nodeSettings = Settings.builder()
41-
.put(DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING.getKey(), "ec2")
41+
.put(DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING.getKey(), "ec2")
4242
.build();
4343
internalCluster().startNode(nodeSettings);
4444

plugins/discovery-gce/qa/gce/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ integTestCluster {
5151
dependsOn gceFixture
5252
numNodes = gceNumberOfNodes
5353
plugin ':plugins:discovery-gce'
54-
setting 'discovery.zen.hosts_provider', 'gce'
54+
setting 'discovery.seed_providers', 'gce'
5555

5656
// use gce fixture for Auth calls instead of http://metadata.google.internal
5757
integTestCluster.environment 'GCE_METADATA_HOST', "http://${-> gceFixture.addressAndPort}"

plugins/discovery-gce/src/test/java/org/elasticsearch/discovery/gce/GceDiscoverTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import java.util.concurrent.ConcurrentHashMap;
4141

4242
import static java.util.Collections.singletonList;
43+
import static org.elasticsearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING;
4344
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
4445

4546
@ESIntegTestCase.ClusterScope(supportsDedicatedMasters = false, numDataNodes = 0, numClientNodes = 0)
@@ -62,7 +63,7 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
6263
protected Settings nodeSettings(int nodeOrdinal) {
6364
return Settings.builder()
6465
.put(super.nodeSettings(nodeOrdinal))
65-
.put("discovery.zen.hosts_provider", "gce")
66+
.put(DISCOVERY_SEED_PROVIDERS_SETTING.getKey(), "gce")
6667
.put("cloud.gce.project_id", "test")
6768
.put("cloud.gce.zone", "test")
6869
.build();

0 commit comments

Comments
 (0)