Commit Graph

39416 Commits

Author SHA1 Message Date
Martijn van Groningen a82f2e31b4
[CCR] Also copy routing_num_shards from leader to follow index. (#30894)
Bug was introduced when create and follow api was added in #30602
2018-05-31 08:03:53 +02:00
Nhat Nguyen 16402305bb Merge branch 'master' into ccr
* master:
  [CI] Mute Ml rolling upgrade tests
  Fix license on AcitveDirectorySIDUtil (#30972)
  [Test] Prefer ArrayList over Vector (#30965)
  [CI] Mute HttpSecretsIntegrationTests#testWebhookAction test
  Mute FlushIT tests
  Add “took” timing info to response for _msearch/template API (#30961)
2018-05-30 21:36:56 -04:00
Igor Motov 8e4ab82e3d [CI] Mute Ml rolling upgrade tests
Tracked by #30982
2018-05-30 21:30:18 -04:00
Nhat Nguyen 8793ebcda0
Limit num hits when reading Lucene changes (#30908)
Today we don't limit the number of hits when reading changes from Lucene
index. If the index and the requesting seq# range both are large, the
searcher may consume a huge amount of memory.

This commit uses a fixed size batch with search_after to avoid the
problem.
2018-05-30 18:36:06 -04:00
Jason Tedor 735f232e03
Fix license on AcitveDirectorySIDUtil (#30972)
This code is from an Apache 2.0 licensed codebase and when we imported
it into our codebase it carried the Apache 2.0 license as well. However,
during the migration of the X-Pack codebase from the internal private
repository to the elastic/elasticsearch repository, the migration tool
mistakently changed the license on this source file from the Apache 2.0
license to the Elastic license. This commit addresses this mistake by
reapplying the Apache 2.0 license.
2018-05-30 15:28:25 -04:00
Christoph Büscher 0a5d46ef3c
[Test] Prefer ArrayList over Vector (#30965)
Replaces some occurances of Vector class with ArrayList in
tests of the rank-eval module.
2018-05-30 21:11:49 +02:00
Nhat Nguyen f25ee254cc Mute ShardChangesIT#testFollowIndex 2018-05-30 14:29:58 -04:00
Igor Motov 1da26a42cb [CI] Mute HttpSecretsIntegrationTests#testWebhookAction test
Tracked by #30094
2018-05-30 14:29:06 -04:00
Nhat Nguyen b834254862 Mute FlushIT tests
We have identified the source causing these tests failed.
This commit mutes them again until we have a proper fix.

Relates #29392
2018-05-30 14:23:53 -04:00
markharwood facbb2b2dc
Add “took” timing info to response for _msearch/template API (#30961)
Add “took” timing info to response for _msearch/template API
Closes #30957
2018-05-30 17:57:28 +01:00
Nhat Nguyen 5e81a20171 Merge branch 'master' into ccr
* master:
  Add Verify Repository High Level REST API (#30934)
  [CI] Mute SamlAuthenticatorTests testIncorrectSigningKeyIsRejected
  [DOCS] Fixes kibana security file location
  SQL: Remove log4j and joda from JDBC dependencies (#30938)
  Revert accidentally pushed changes in NoriAnalysisTests
  Fix composite agg serialization error
  Change ScriptException status to 400 (bad request) (#30861)
  Fix synced flush docs
  REST high-level client: add synced flush API (2) (#30650)
  Fix missing option serialization after backport
  Cross Cluster Search: do not use dedicated masters as gateways (#30926)
  Fix AliasMetaData parsing (#30866)
  Fsync state file before exposing it (#30929)
2018-05-30 12:11:52 -04:00
Michael Basnight b716b08197
Add Verify Repository High Level REST API (#30934)
This commit adds Verify Repository, the associated docs and tests for
the high level REST API client. A few small changes to the Verify
Repository Response went into the commit as well.

Relates #27205
2018-05-30 11:10:00 -05:00
Igor Motov 96b4dae221 [CI] Mute SamlAuthenticatorTests testIncorrectSigningKeyIsRejected
Tracked by #30970
2018-05-30 11:29:17 -04:00
lcawl 94e1bdba33 [DOCS] Fixes kibana security file location 2018-05-30 07:47:20 -07:00
Igor Motov cdbbbafb9f
SQL: Remove log4j and joda from JDBC dependencies (#30938)
More cleanup of JDBC driver project

Relates to #29856
2018-05-30 09:57:32 -04:00
Jim Ferenczi e852eb0548 Revert accidentally pushed changes in NoriAnalysisTests 2018-05-30 15:34:55 +02:00
Jim Ferenczi 532b91ffa6 Fix composite agg serialization error
Fix serialization after backport

Relates #29465
2018-05-30 14:22:48 +02:00
Christoph Büscher 1ea9f11b03
Change ScriptException status to 400 (bad request) (#30861)
Currently failures to compile a script usually lead to a ScriptException, which
inherits the 500 INTERNAL_SERVER_ERROR from ElasticsearchException if it does
not contain another root cause. Instead, this should be a 400 Bad Request error.
This PR changes this more generally for script compilation errors by changing 
ScriptException to return 400 (bad request) as status code.

Closes #12315
2018-05-30 14:00:07 +02:00
Nik Everett 7c5abc0a6b Fix synced flush docs
They had some copy and paste errors that failed the docs build.
2018-05-30 07:51:12 -04:00
Sohaib Iftikhar 2c27c58718 REST high-level client: add synced flush API (2) (#30650)
Adds the synced flush API to the high level REST client.

Relates to #27205.
2018-05-30 07:32:52 -04:00
Jim Ferenczi f582418ada Fix missing option serialization after backport
Relates #29465
2018-05-30 12:55:31 +02:00
Martijn van Groningen adca32eae7
no need to resolve index name as only concrete index names are used 2018-05-30 12:42:35 +02:00
Luca Cavanna 3c21e46fa3
Cross Cluster Search: do not use dedicated masters as gateways (#30926)
When we are connecting to a remote cluster we should never select
dedicated master nodes as gateway nodes, or we will end up loading them
with requests that should rather go to other type of nodes e.g. data
nodes or coord_only nodes.

This commit adds the selection based on the node role, to the existing
selection based on version and potential node attributes.

Closes #30687
2018-05-30 12:32:41 +02:00
olcbean 6341d101d2 Fix AliasMetaData parsing (#30866)
AliasMetaData should be parsed more leniently so that the high-level REST client can support forward compatibility on it. This commit addresses this issue that was found as part of #28799 and adds dedicated XContent tests as well.
2018-05-30 12:31:24 +02:00
Martijn van Groningen 4a20dca5fe
Required changes after merging in master. 2018-05-30 10:26:49 +02:00
Yannick Welsch ff8ce2c575
Fsync state file before exposing it (#30929)
With multiple data paths, we write the state files for index metadata to all data paths. We only properly fsync on the first location, though. For other locations, we possibly expose the file before its contents is properly fsynced. This can lead to situations where, after a crash, and where the first data path is not available anymore, ES will see a partially-written state file, preventing the node to start up.
2018-05-30 10:15:12 +02:00
Martijn van Groningen 56472d6505
Merge remote-tracking branch 'es/master' into ccr
* es/master: (24 commits)
  Add missing_bucket option in the composite agg (#29465)
  Rename index_prefix to index_prefixes (#30932)
  Rename methods in PersistentTasksService (#30837)
  [DOCS] Fix watcher file location
  Update the version checks around range bucket keys, now that the change was backported.
  Use dedicated ML APIs in tests (#30941)
  [DOCS] Remove reference to platinum Docker image (#30916)
  Minor clean-up in InternalRange. (#30886)
  stable filemode for zip distributions (#30854)
  [DOCS] Adds missing TLS settings for auditing (#30822)
  [test] packaging: use shell when running commands (#30852)
  Fix location of AbstractHttpServerTransport (#30888)
  [test] packaging test logging for suse distros
  Moved keyword tokenizer to analysis-common module (#30642)
  Upgrade to Lucene-7.4-snapshot-1cbadda4d3 (#30928)
  Limit the scope of BouncyCastle dependency (#30358)
  [DOCS] Reset edit links (#30909)
  Fix IndexTemplateMetaData parsing from xContent (#30917)
  Remove log traces in AzureStorageServiceImpl and fix test (#30924)
  Deprecate accepting malformed requests in stored script API (#28939)
  ...
2018-05-30 09:55:34 +02:00
Jim Ferenczi e33d107f84
Add missing_bucket option in the composite agg (#29465)
This change adds a new option to the composite aggregation named `missing_bucket`.
This option can be set by source and dictates whether documents without a value for the
source should be ignored. When set to true, documents without a value for a field emits
an explicit `null` value which is then added in the composite bucket.
The `missing` option that allows to set an explicit value (instead of `null`) is deprecated in this change and will be removed in a follow up (only in 7.x).
This commit also changes how the big arrays are allocated, instead of reserving
the provided `size` for all sources they are created with a small intial size and they grow
depending on the number of buckets created by the aggregation:
Closes #29380
2018-05-30 09:48:40 +02:00
Alan Woodward 67905c85a5
Rename index_prefix to index_prefixes (#30932)
This commit also adds index_prefixes tests to TextFieldMapperTests to ensure that cloning and wire-serialization work correctly
2018-05-30 08:32:31 +01:00
Tanguy Leroux a0af0e7f1e
Rename methods in PersistentTasksService (#30837)
This commit renames methods in the PersistentTasksService, to 
make obvious that the methods send requests in order to change 
the state of persistent tasks. 

Relates to #29608.
2018-05-30 09:20:14 +02:00
lcawl b5c997b10b [DOCS] Fix watcher file location 2018-05-29 21:56:57 -07:00
Julie Tibshirani 913778b37a Update the version checks around range bucket keys, now that the change was backported. 2018-05-29 20:51:27 -07:00
Jason Tedor bcfdccaf3f
Use dedicated ML APIs in tests (#30941)
ML has dedicated APIs for datafeeds and jobs yet base test classes and
some tests were relying on the cluster state for this state. This commit
removes this usage in favor of using the dedicated endpoints.
2018-05-29 21:17:47 -04:00
Toby McLaughlin 83a7ade7c5
[DOCS] Remove reference to platinum Docker image (#30916) 2018-05-30 11:17:02 +10:00
Julie Tibshirani a79c5bd3d6
Minor clean-up in InternalRange. (#30886)
* Make sure all instance variables are final.
* Make generateKey a private static method, instead of protected.
* Rename formatter -> format for consistency.
* Serialize bucket keys as strings as opposed to optional strings.
* Pull the stream serialization logic for buckets into the Bucket class.
2018-05-29 18:16:02 -07:00
Andy Bristol 116d08303e
stable filemode for zip distributions (#30854)
Applies default file and directory permissions to zip distributions
similar to how they're set for the tar distributions. Previously zip
distributions would retain permissions they had on the build host's
working tree, which could vary depending on its umask

For #30799
2018-05-29 17:32:06 -07:00
Lisa Cawley eb2e43b695
[DOCS] Adds missing TLS settings for auditing (#30822) 2018-05-29 15:53:19 -07:00
Andy Bristol 4001097a68
[test] packaging: use shell when running commands (#30852)
When subprocesses are started with ProcessBuilder, they're forked by the
java process directly rather than from a shell, which can be surprising
for our use case here in the packaging tests which is similar to
scripting.

This commit changes the tests to run their subprocess commands in a
shell, using the bash -c <script> syntax for commands on linux and using
the powershell.exe -Command <script> syntax for commands on windows.
This syntax on windows is essentially what the tests were already doing.
2018-05-29 15:17:11 -07:00
Tim Brooks ad0dc580c5
Fix location of AbstractHttpServerTransport (#30888)
Currently AbstractHttpServerTransport is in a netty4 module. This is the
incorrect location. This commit moves it out of netty4 module.
Additionally, it moves unit tests that test AbstractHttpServerTransport
logic to server.
2018-05-29 13:14:23 -06:00
Andy Bristol ba8bb1d4a1 [test] packaging test logging for suse distros 2018-05-29 11:06:57 -07:00
Martijn van Groningen 544822c78b
Moved keyword tokenizer to analysis-common module (#30642)
Relates to #23658
2018-05-29 19:22:28 +02:00
Nhat Nguyen 363f1e84ca
Upgrade to Lucene-7.4-snapshot-1cbadda4d3 (#30928)
This snapshot includes LUCENE-8328 which is needed to stabilize CCR builds.
2018-05-29 12:29:52 -04:00
Ioannis Kakavas a8faf9768a
Limit the scope of BouncyCastle dependency (#30358)
Limits the scope of the runtime dependency on
BouncyCastle so that it can be eventually removed.

* Splits functionality related to reading and generating certificates
and keys in two utility classes so that reading certificates and
keys doesn't require BouncyCastle.
* Implements a class for parsing PEM Encoded key material (which also
adds support for reading PKCS8 encoded encrypted private keys).
* Removes BouncyCastle dependency for all of our test suites(except
for the tests that explicitly test certificate generation) by using
pre-generated keys/certificates/keystores.
2018-05-29 19:11:09 +03:00
Lisa Cawley 6ce86a8d7f
[DOCS] Reset edit links (#30909) 2018-05-29 08:16:53 -07:00
Nhat Nguyen 9e9abc31b8
Fix IndexTemplateMetaData parsing from xContent (#30917)
We failed to register "aliases" and "version" into the list of keywords
in the IndexTemplateMetaData; then fail to parse the following index
template.

```
{
    "aliases": {"log": {}},
    "index_patterns": ["pattern-1"]
}
```
This commit registers that missing keywords.
2018-05-29 11:14:39 -04:00
Tanguy Leroux bfa784e5cd
Remove log traces in AzureStorageServiceImpl and fix test (#30924)
This commit removes some log traces in AzureStorageServiceImpl and also
fixes the AzureStorageServiceTests so that is uses the real
implementation to create Azure clients.
2018-05-29 16:50:37 +02:00
Sohaib Iftikhar 3c918d799c Deprecate accepting malformed requests in stored script API (#28939)
The stored scripts API today accepts malformed requests instead of throwing an exception.
This PR deprecates accepting malformed put stored script requests (requests not using the official script format).

Relates to #27612
2018-05-29 15:45:53 +02:00
Luca Cavanna eaee530778
Move list tasks under Tasks namespace (#30906)
Our API spec define the tasks API as e.g. tasks.list, meaning that they belong to their own namespace. This commit moves them from the cluster namespace to their own namespace.

Relates to #29546
2018-05-29 10:54:41 +02:00
Christoph Büscher c137ad0c39
Replace several try-finally statements (#30880)
This change replaces some existing try-finally statements that close resources
in their finally block with the slightly shorter and safer try-with-resources
pattern.
2018-05-29 10:31:52 +02:00
David Turner 89869a2d0d
Improve allocation-disabling instructions (#30248)
Clarify the “one minute” in the instructions to disable the shard allocation
when doing maintenance to say that it is configurable.
2018-05-29 08:34:20 +01:00