Skip to content

Commit a990dd7

Browse files
committed
Merge branch 'master' into feature/searchable-snapshots
2 parents 30b5553 + c6746e2 commit a990dd7

File tree

139 files changed

+5197
-1951
lines changed

Some content is hidden

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

139 files changed

+5197
-1951
lines changed

TESTING.asciidoc

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ zip, and deb packages and all the plugins. It will then run the tests on every
340340
available system. This will take a very long time.
341341
+
342342
Fortunately, the various systems under test have their own Gradle tasks under
343-
`qa/os`. To find out what packaging combinations can be tested on a system, run
343+
`qa/os`. To find the systems tested, do a listing of the `qa/os` directory.
344+
To find out what packaging combinations can be tested on a system, run
344345
the `tasks` task. For example:
345346
+
346347
----------------------------------
@@ -360,28 +361,7 @@ will remain running and you'll have to stop them manually with `./gradlew --stop
360361

361362
All the regular vagrant commands should just work so you can get a shell in a
362363
VM running trusty by running
363-
`vagrant up ubuntu-1604 --provider virtualbox && vagrant ssh ubuntu-1604`.
364-
365-
These are the linux flavors supported, all of which we provide images for
366-
367-
* ubuntu-1604 aka xenial
368-
* ubuntu-1804 aka bionic beaver
369-
* debian-8 aka jessie
370-
* debian-9 aka stretch, the current debian stable distribution
371-
* centos-6
372-
* centos-7
373-
* rhel-8
374-
* fedora-28
375-
* fedora-29
376-
* oel-6 aka Oracle Enterprise Linux 6
377-
* oel-7 aka Oracle Enterprise Linux 7
378-
* sles-12
379-
* opensuse-42 aka Leap
380-
381-
We're missing the following from the support matrix because there aren't high
382-
quality boxes available in vagrant atlas:
383-
384-
* sles-11
364+
`vagrant up ubuntu-1804 --provider virtualbox && vagrant ssh ubuntu-1804`.
385365

386366
=== Testing packaging on Windows
387367

buildSrc/src/main/java/org/elasticsearch/gradle/tool/DockerUtils.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,7 @@ public static void assertDockerIsAvailable(Project project, List<String> tasks)
146146
throwDockerRequiredException(message);
147147
}
148148

149-
if (availability.version == null) {
150-
final String message = String.format(
151-
Locale.ROOT,
152-
"Docker is required to run the following task%s, but it doesn't appear to be running: \n%s",
153-
tasks.size() > 1 ? "s" : "",
154-
String.join("\n", tasks)
155-
);
156-
throwDockerRequiredException(message);
157-
}
158-
159-
if (availability.isVersionHighEnough == false) {
149+
if (availability.lastCommand.isSuccess() && availability.isVersionHighEnough == false) {
160150
final String message = String.format(
161151
Locale.ROOT,
162152
"building Docker images requires Docker version 17.05+ due to use of multi-stage builds yet was [%s]",
@@ -168,9 +158,10 @@ public static void assertDockerIsAvailable(Project project, List<String> tasks)
168158
// Some other problem, print the error
169159
final String message = String.format(
170160
Locale.ROOT,
171-
"a problem occurred running Docker from [%s] yet it is required to run the following task%s: \n%s\n"
172-
+ "the problem is that Docker exited with exit code [%d] with standard error output [%s]",
161+
"a problem occurred while using Docker from [%s]%s yet it is required to run the following task%s: \n%s\n"
162+
+ "the problem is that Docker exited with exit code [%d] with standard error output:\n%s",
173163
availability.path,
164+
availability.version == null ? "" : " v" + availability.version,
174165
tasks.size() > 1 ? "s" : "",
175166
String.join("\n", tasks),
176167
availability.lastCommand.exitCode,
@@ -213,8 +204,8 @@ private static Result runCommand(Project project, String... args) {
213204
spec.setCommandLine((Object[]) args);
214205
spec.setStandardOutput(stdout);
215206
spec.setErrorOutput(stderr);
207+
spec.setIgnoreExitValue(true);
216208
});
217-
218209
return new Result(execResult.getExitValue(), stdout.toString(), stderr.toString());
219210
}
220211

buildSrc/src/main/resources/checkstyle.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<property name="message" value="Empty javadoc comments are forbidden"/>
1919
</module>
2020

21-
<!--
21+
<!--
2222
We include snippets that are wrapped in `// tag` and `// end` into the
2323
docs, stripping the leading spaces. If the context is wider than 76
2424
characters then it'll need to scroll. This fails the build if it sees
@@ -103,5 +103,31 @@
103103
<property name="ignoreComments" value="true" />
104104
</module>
105105
<!-- end Orwellian suppression of Serializable -->
106+
107+
<!-- Forbid equality comparisons with `true` -->
108+
<module name="DescendantToken">
109+
<property name="tokens" value="EQUAL"/>
110+
<property name="limitedTokens" value="LITERAL_TRUE"/>
111+
<property name="maximumNumber" value="0"/>
112+
<property name="maximumDepth" value="1"/>
113+
<message key="descendant.token.max" value="Do not check for equality with 'true', since it is implied"/>
114+
</module>
115+
116+
<!-- Forbid using '!' for logical negations in favour of checking
117+
against 'false' explicitly. -->
118+
<!-- This is disabled for now because there are many, many violations,
119+
hence the rule is reporting at the "warning" severity. -->
120+
121+
<!--
122+
<module name="DescendantToken">
123+
<property name="severity" value="warning"/>
124+
<property name="tokens" value="EXPR"/>
125+
<property name="limitedTokens" value="LNOT"/>
126+
<property name="maximumNumber" value="0"/>
127+
<property name="maximumDepth" value="1"/>
128+
<message key="descendant.token.max" value="Do not negate boolean expressions with '!', but check explicitly with '== false' as it is more explicit"/>
129+
</module>
130+
-->
131+
106132
</module>
107133
</module>

buildSrc/src/main/resources/forbidden/jdk-signatures.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ java.net.MulticastSocket#<init>(int)
5959
java.net.ServerSocket#<init>(int)
6060
java.net.ServerSocket#<init>(int,int)
6161

62-
@defaultMessage use NetworkAddress format/formatAddress to print IP or IP+ports
62+
@defaultMessage use NetworkAddress format() to print IP or IP+ports
6363
java.net.InetAddress#toString()
6464
java.net.InetAddress#getHostAddress()
6565
java.net.Inet4Address#getHostAddress()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ public void testFieldCaps() throws IOException {
12421242
assertEquals(1, fieldResponse.size());
12431243

12441244
FieldCapabilities expectedTextCapabilities = new FieldCapabilities(
1245-
"field", "text", true, false, Collections.emptyMap());
1245+
"field", "text", true, false, null, null, null, Collections.emptyMap());
12461246
assertEquals(expectedTextCapabilities, fieldResponse.get("text"));
12471247
}
12481248

docs/reference/cat/nodes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Used disk space, such as `259.8gb`.
8787
Available disk space, such as `198.4gb`.
8888

8989
`disk.used_percent`, `dup`, `diskUsedPercent`::
90-
Used disk space percentage, such as `198.4gb`.
90+
Used disk space percentage, such as `47`.
9191

9292
`heap.current`, `hc`, `heapCurrent`::
9393
Used heap, such as `311.2mb`.

docs/reference/cluster/nodes-reload-secure-settings.asciidoc

Lines changed: 65 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,59 @@
44
<titleabbrev>Nodes reload secure settings</titleabbrev>
55
++++
66

7+
Reloads the keystore on nodes in the cluster.
78

8-
The cluster nodes reload secure settings API is used to re-load the keystore on each node.
9+
[[cluster-nodes-reload-secure-settings-api-request]]
10+
==== {api-request-title}
911

10-
[source,console]
11-
--------------------------------------------------
12-
POST _nodes/reload_secure_settings
13-
POST _nodes/nodeId1,nodeId2/reload_secure_settings
14-
--------------------------------------------------
15-
// TEST[setup:node]
16-
// TEST[s/nodeId1,nodeId2/*/]
12+
`POST _nodes/reload_secure_settings` +
13+
`POST _nodes/<nodes/reload_secure_settings`
1714

18-
The first command reloads the keystore on each node. The seconds allows
19-
to selectively target `nodeId1` and `nodeId2`. The node selection options are
20-
detailed <<cluster-nodes,here>>.
15+
[[cluster-nodes-reload-secure-settings-api-desc]]
16+
==== {api-description-title}
2117

22-
NOTE: {es} requires consistent secure settings across the cluster nodes, but this consistency is not enforced.
23-
Hence, reloading specific nodes is not standard. It is only justifiable when retrying failed reload operations.
18+
<<secure-settings,Secure settings>> are stored in an on-disk keystore. Certain
19+
of these settings are <<reloadable-secure-settings,reloadable>>. That is, you
20+
can change them on disk and reload them without restarting any nodes in the
21+
cluster. When you have updated reloadable secure settings in your keystore, you
22+
can use this API to reload those settings on each node.
2423

25-
==== Reload Password Protected Secure Settings
24+
When the {es} keystore is password protected and not simply obfuscated, you must
25+
provide the password for the keystore when you reload the secure settings.
26+
Reloading the settings for the whole cluster assumes that all nodes' keystores
27+
are protected with the same password; this method is allowed only when
28+
<<tls-transport,inter-node communications are encrypted>>. Alternatively, you can
29+
reload the secure settings on each node by locally accessing the API and passing
30+
the node-specific {es} keystore password.
2631

27-
When the {es} keystore is password protected and not simply obfuscated, the password for the keystore needs
28-
to be provided in the request to reload the secure settings.
29-
Reloading the settings for the whole cluster assumes that all nodes' keystores are protected with the same password
30-
and is only allowed when {ref}/configuring-tls.html#tls-transport[node to node communications are encrypted]
32+
[[cluster-nodes-reload-secure-settings-path-params]]
33+
==== {api-path-parms-title}
3134

32-
[source,js]
33-
--------------------------------------------------
34-
POST _nodes/reload_secure_settings
35-
{
36-
"reload_secure_settings": "s3cr3t" <1>
37-
}
38-
--------------------------------------------------
39-
// NOTCONSOLE
35+
`<nodes>`::
36+
(Optional, string) The names of particular nodes in the cluster to target.
37+
For example, `nodeId1,nodeId2`. For node selection options, see
38+
<<cluster-nodes>>.
39+
40+
NOTE: {es} requires consistent secure settings across the cluster nodes, but
41+
this consistency is not enforced. Hence, reloading specific nodes is not
42+
standard. It is justifiable only when retrying failed reload operations.
4043

41-
<1> The common password that the {es} keystore is encrypted with in every node of the cluster.
44+
[[cluster-nodes-reload-secure-settings-api-request-body]]
45+
==== {api-request-body-title}
4246

43-
Alternatively the secure settings can be reloaded on a per node basis, locally accessing the API and passing the
44-
node-specific {es} keystore password.
47+
`reload_secure_settings`::
48+
(Optional, string) The password for the {es} keystore.
4549

46-
[source,js]
50+
[[cluster-nodes-reload-secure-settings-api-example]]
51+
==== {api-examples-title}
52+
53+
[source,console]
4754
--------------------------------------------------
48-
POST _nodes/_local/reload_secure_settings
49-
{
50-
"reload_secure_settings": "s3cr3t" <1>
51-
}
55+
POST _nodes/reload_secure_settings
56+
POST _nodes/nodeId1,nodeId2/reload_secure_settings
5257
--------------------------------------------------
53-
// NOTCONSOLE
54-
55-
<1> The password that the {es} keystore is encrypted with on the local node.
56-
57-
58-
[float]
59-
[[rest-reload-secure-settings]]
60-
==== REST Reload Secure Settings Response
58+
// TEST[setup:node]
59+
// TEST[s/nodeId1,nodeId2/*/]
6160

6261
The response contains the `nodes` object, which is a map, keyed by the
6362
node id. Each value has the node `name` and an optional `reload_exception`
@@ -82,3 +81,27 @@ that was thrown during the reload process, if any.
8281
--------------------------------------------------
8382
// TESTRESPONSE[s/"my_cluster"/$body.cluster_name/]
8483
// TESTRESPONSE[s/"pQHNt5rXTTWNvUgOrdynKg"/\$node_name/]
84+
85+
The following example uses a common password for the {es} keystore on every
86+
node of the cluster:
87+
88+
[source,js]
89+
--------------------------------------------------
90+
POST _nodes/reload_secure_settings
91+
{
92+
"reload_secure_settings": "s3cr3t"
93+
}
94+
--------------------------------------------------
95+
// NOTCONSOLE
96+
97+
The following example uses a password for the {es} keystore on the local node:
98+
99+
[source,js]
100+
--------------------------------------------------
101+
POST _nodes/_local/reload_secure_settings
102+
{
103+
"reload_secure_settings": "s3cr3t"
104+
}
105+
--------------------------------------------------
106+
// NOTCONSOLE
107+

docs/reference/cluster/stats.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,19 @@ The API returns the following response:
438438
"fixed_bit_set_memory_in_bytes": 0,
439439
"max_unsafe_auto_id_timestamp" : -9223372036854775808,
440440
"file_sizes": {}
441+
},
442+
"mappings": {
443+
"field_types": []
444+
},
445+
"analysis": {
446+
"char_filter_types": [],
447+
"tokenizer_types": [],
448+
"filter_types": [],
449+
"analyzer_types": [],
450+
"built_in_char_filters": [],
451+
"built_in_tokenizers": [],
452+
"built_in_filters": [],
453+
"built_in_analyzers": []
441454
}
442455
},
443456
"nodes": {
@@ -554,6 +567,7 @@ The API returns the following response:
554567
// TESTRESPONSE[s/"processor_stats": \{[^\}]*\}/"processor_stats": $body.$_path/]
555568
// TESTRESPONSE[s/"count": \{[^\}]*\}/"count": $body.$_path/]
556569
// TESTRESPONSE[s/"packaging_types": \[[^\]]*\]/"packaging_types": $body.$_path/]
570+
// TESTRESPONSE[s/"field_types": \[[^\]]*\]/"field_types": $body.$_path/]
557571
// TESTRESPONSE[s/: true|false/: $body.$_path/]
558572
// TESTRESPONSE[s/: (\-)?[0-9]+/: $body.$_path/]
559573
// TESTRESPONSE[s/: "[^"]*"/: $body.$_path/]

docs/reference/how-to/search-speed.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ queries, this can speed up queries significantly.
414414
[[faster-prefix-queries]]
415415
=== Faster prefix queries with `index_prefixes`
416416

417-
The <<text,`text`>> field has an <<index-phrases,`index_prefixes`>> option that
417+
The <<text,`text`>> field has an <<index-prefixes,`index_prefixes`>> option that
418418
indexes prefixes of all terms and is automatically leveraged by query parsers to
419419
run prefix queries. If your use-case involves running lots of prefix queries,
420420
this can speed up queries significantly.

docs/reference/ingest/processors/csv.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ include::common-options.asciidoc[]
2121
{
2222
"csv": {
2323
"field": "my_field",
24-
"target_fields": ["field1, field2"],
24+
"target_fields": ["field1, field2"]
2525
}
2626
}
2727
--------------------------------------------------

docs/reference/setup/secure-settings.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ are node-specific settings that must have the same value on every node.
2525
Just like the settings values in `elasticsearch.yml`, changes to the keystore
2626
contents are not automatically applied to the running {es} node. Re-reading
2727
settings requires a node restart. However, certain secure settings are marked as
28-
*reloadable*. Such settings can be re-read and applied on a running node.
28+
*reloadable*. Such settings can be <<cluster-nodes-reload-secure-settings, re-read and applied on a running node>>.
2929

3030
The values of all secure settings, *reloadable* or not, must be identical
3131
across all cluster nodes. After making the desired secure settings changes,
@@ -50,8 +50,8 @@ dependent on these settings have been changed. Everything should look as if the
5050
settings had the new value from the start.
5151

5252
When changing multiple *reloadable* secure settings, modify all of them on each
53-
cluster node, then issue a `reload_secure_settings` call instead of reloading
54-
after each modification.
53+
cluster node, then issue a <<cluster-nodes-reload-secure-settings, `reload_secure_settings`>>
54+
call instead of reloading after each modification.
5555

5656
There are reloadable secure settings for:
5757

docs/src/test/java/org/elasticsearch/smoketest/DocsClientYamlTestSuiteIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ protected boolean preserveTemplatesUponCompletion() {
143143

144144
protected boolean isSLMTest() {
145145
String testName = getTestName();
146-
return testName != null && (testName.contains("/slm/") || testName.contains("\\slm\\") ||
146+
return testName != null && (testName.contains("/slm/") || testName.contains("\\slm\\") || (testName.contains("\\slm/")) ||
147147
// TODO: Remove after backport of https://github.com/elastic/elasticsearch/pull/48705 which moves SLM docs to correct folder
148-
testName.contains("/ilm/") || testName.contains("\\ilm\\"));
148+
testName.contains("/ilm/") || testName.contains("\\ilm\\") || testName.contains("\\ilm/"));
149149
}
150150

151151
protected boolean isILMTest() {
152152
String testName = getTestName();
153-
return testName != null && (testName.contains("/ilm/") || testName.contains("\\ilm\\"));
153+
return testName != null && (testName.contains("/ilm/") || testName.contains("\\ilm\\") || testName.contains("\\ilm/"));
154154
}
155155

156156
protected boolean isMachineLearningTest() {

libs/grok/src/main/resources/patterns/grok-patterns

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ URIPATHPARAM %{URIPATH}(?:%{URIPARAM})?
4949
URI %{URIPROTO}://(?:%{USER}(?::[^@]*)?@)?(?:%{URIHOST})?(?:%{URIPATHPARAM})?
5050

5151
# Months: January, Feb, 3, 03, 12, December
52-
MONTH \b(?:[Jj]an(?:uary|uar)?|[Ff]eb(?:ruary|ruar)?|[Mm](?:a|ä)?r(?:ch|z)?|[Aa]pr(?:il)?|[Mm]a(?:y|i)?|[Jj]un(?:e|i)?|[Jj]ul(?:y)?|[Aa]ug(?:ust)?|[Ss]ep(?:tember)?|[Oo](?:c|k)?t(?:ober)?|[Nn]ov(?:ember)?|[Dd]e(?:c|z)(?:ember)?)\b
52+
MONTH \b(?:[Jj]an(?:uary|uar)?|[Ff]eb(?:ruary|ruar)?|[Mm](?:a|ä)?r(?:ch|z)?|[Aa]pr(?:il)?|[Mm]a(?:y|i)?|[Jj]un(?:e|i)?|[Jj]ul(?:y|i)?|[Aa]ug(?:ust)?|[Ss]ep(?:tember)?|[Oo](?:c|k)?t(?:ober)?|[Nn]ov(?:ember)?|[Dd]e(?:c|z)(?:ember)?)\b
5353
MONTHNUM (?:0?[1-9]|1[0-2])
5454
MONTHNUM2 (?:0[1-9]|1[0-2])
5555
MONTHDAY (?:(?:0[1-9])|(?:[12][0-9])|(?:3[01])|[1-9])

0 commit comments

Comments
 (0)