Skip to content

Commit ff9520e

Browse files
committed
Merge branch 'master' into simplify-retention-lease-expiration
* master: Mute failing API key integration test (elastic#38409) Change the milliseconds precision to 3 digits for intervals. (elastic#38297) SecuritySettingsSource license.self_generated: trial (elastic#38233) Rename no-master-block setting (elastic#38350) Rename static Zen1 settings (elastic#38333) Migration doc for audit json log file (elastic#38165) Add apm_user reserved role (elastic#38206)
2 parents fb01037 + 638ba4a commit ff9520e

File tree

75 files changed

+663
-279
lines changed

Some content is hidden

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

75 files changed

+663
-279
lines changed

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

+5-3
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) {

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SecurityDocumentationIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,8 @@ public void testGetRoles() throws Exception {
654654

655655
List<Role> roles = response.getRoles();
656656
assertNotNull(response);
657-
// 24 system roles plus the three we created
658-
assertThat(roles.size(), equalTo(27));
657+
// 25 system roles plus the three we created
658+
assertThat(roles.size(), equalTo(28));
659659
}
660660

661661
{

distribution/src/config/elasticsearch.yml

+2-2
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

+1-1
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

+1-1
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

+5-5
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

+10-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ 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`
41+
42+
[float]
43+
==== New name for `no_master_block` setting
44+
45+
The `discovery.zen.no_master_block` setting is now known as
46+
`cluster.no_master_block`. Any value set for `discovery.zen.no_master_block` is
47+
now ignored. You should remove this setting and, if needed, set
48+
`cluster.no_master_block` appropriately after the upgrade.

docs/reference/migration/migrate_7_0/logging.asciidoc

+9
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@ Note: GC logs which are written to the file `gc.log` will not be changed.
3131
==== Docker output in JSON format
3232

3333
All Docker console logs are now in JSON format. You can distinguish logs streams with the `type` field.
34+
35+
[float]
36+
==== Audit plaintext log file removed, JSON file renamed
37+
38+
Elasticsearch no longer produces the `${cluster_name}_access.log` plaintext
39+
audit log file. The `${cluster_name}_audit.log` files also no longer exist; they
40+
are replaced by `${cluster_name}_audit.json` files. When auditing is enabled,
41+
auditing events are stored in these dedicated JSON log files on each node.
42+

docs/reference/modules/discovery/bootstrapping.asciidoc

+2-2
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

+19-9
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,12 +129,12 @@ 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

136-
[[no-master-block]]`discovery.zen.no_master_block`::
137+
[[no-master-block]]`cluster.no_master_block`::
137138
Specifies which operations are rejected when there is no active master in a
138139
cluster. This setting has two valid values:
139140
+
@@ -149,23 +150,32 @@ cluster.
149150

150151
[NOTE]
151152
===============================
152-
* The `discovery.zen.no_master_block` setting doesn't apply to nodes-based APIs
153+
* The `cluster.no_master_block` setting doesn't apply to nodes-based APIs
153154
(for example, cluster stats, node info, and node stats APIs). Requests to these
154155
APIs are not be blocked and can run on any available node.
155156
156157
* For the cluster to be fully operational, it must have an active master.
157158
===============================
159+
160+
WARNING: This setting replaces the `discovery.zen.no_master_block` setting in
161+
earlier versions. The `discovery.zen.no_master_block` setting is ignored.
162+
158163
--
159164

160-
`discovery.zen.ping.unicast.hosts`::
165+
`discovery.seed_hosts`::
161166

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

168-
`discovery.zen.ping.unicast.hosts.resolve_timeout`::
173+
`discovery.seed_resolver.timeout`::
169174

170175
Sets the amount of time to wait for DNS lookups on each round of discovery.
171176
This is specified as a <<time-units, time unit>> and defaults to `5s`.
177+
178+
`discovery.seed_resolver.max_concurrent_resolvers`::
179+
180+
Sets the number of threads with which to perform DNS lookups for seed nodes.
181+
This defaults to `10`.

docs/reference/modules/discovery/discovery.asciidoc

+14-14
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

+7-8
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

+1-1
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

+2-2
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

+4-4
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

+1-1
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

modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RankEvalResponseTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.elasticsearch.action.search.SearchPhaseExecutionException;
2525
import org.elasticsearch.action.search.ShardSearchFailure;
2626
import org.elasticsearch.cluster.block.ClusterBlockException;
27+
import org.elasticsearch.cluster.coordination.NoMasterBlockService;
2728
import org.elasticsearch.common.ParsingException;
2829
import org.elasticsearch.common.breaker.CircuitBreaker;
2930
import org.elasticsearch.common.breaker.CircuitBreakingException;
@@ -37,7 +38,6 @@
3738
import org.elasticsearch.common.xcontent.XContentLocation;
3839
import org.elasticsearch.common.xcontent.XContentParser;
3940
import org.elasticsearch.common.xcontent.XContentType;
40-
import org.elasticsearch.discovery.DiscoverySettings;
4141
import org.elasticsearch.index.shard.ShardId;
4242
import org.elasticsearch.search.SearchHit;
4343
import org.elasticsearch.search.SearchParseException;
@@ -64,7 +64,7 @@
6464
public class RankEvalResponseTests extends ESTestCase {
6565

6666
private static final Exception[] RANDOM_EXCEPTIONS = new Exception[] {
67-
new ClusterBlockException(singleton(DiscoverySettings.NO_MASTER_BLOCK_WRITES)),
67+
new ClusterBlockException(singleton(NoMasterBlockService.NO_MASTER_BLOCK_WRITES)),
6868
new CircuitBreakingException("Data too large", 123, 456, CircuitBreaker.Durability.PERMANENT),
6969
new SearchParseException(new TestSearchContext(null), "Parse failure", new XContentLocation(12, 98)),
7070
new IllegalArgumentException("Closed resource", new RuntimeException("Resource")),

0 commit comments

Comments
 (0)