Commit Graph

59726 Commits

Author SHA1 Message Date
James Rodewig d9597da0ef
[DOCS] Update security prereqs for delete async EQL API (#75091) 2021-07-12 08:49:55 -04:00
Dimitris Athanasiou 3a76a398cb
[ML] Simplify node load memory calculation for various tasks (#75186)
Refactors calculation of node memory load so that there is a
framework for supporting various different ML tasks. This results
in simpler code and it is a step towards making it easier to
add memory tracking for future tasks.
2021-07-12 14:55:18 +03:00
Ignacio Vera 054e1e54e0
Wrap exception with SendRequestTransportException in CancellableTasksIT (#75216) 2021-07-12 12:42:02 +02:00
Przemyslaw Gomulka ff8aede63a
[Rest Api Compatibility] MoreLikeThisQuery with types (#75123)
previously removed in #42198
also adding a type for MultiTermVectorsResponse in failures

relates #54160
relates #51816
2021-07-12 12:08:45 +02:00
Dimitris Athanasiou 83395d96d3
Mute point-in-time with slicing YAML test (#75222)
Relates #75212
2021-07-12 12:47:15 +03:00
Przemyslaw Gomulka 1855782def
[Rest Api Compatibility] Allow copy_settings flag for resize operations (#75184)
previously removed in #38514, deprecated in 7.x and defaulted to true.
With rest api compatibility and when value is true it is ignored and warning is emitted
when value is false, an exception is thrown

relates #51816
2021-07-12 10:55:24 +02:00
Ignacio Vera caa7e1678b
Fix AbstractSimpleTransportTestCase#testFailToSend (#75211)
Adjust test after changing how exception is wrapped.
2021-07-12 10:37:21 +02:00
Przemysław Witek cbfb9b0e40
[ML] Fix forecasts deletion action when there are many forecast documents. (#75127) 2021-07-12 10:12:24 +02:00
Przemyslaw Gomulka 563e1fb8e1
[Rest Api Compatibility] Return adjust_pure_negative values (#75182)
the adjust_pure_negative value used to be always present in to_xcontent
response, but it was changed in #49543 to only serialise this field when
the value is false

relates #51816
2021-07-12 09:34:25 +02:00
Tim Vernum 45e38b5005
[TEST] Re-enable ReadActionsTests (#75208)
Enable this integration test again, with a set timeout on each search
action.

Relates: #53340
2021-07-12 17:33:41 +10:00
Ignacio Vera b9b1af12fb
Mute AbstractSimpleTransportTestCase#testToFail (#75210) 2021-07-12 08:23:49 +02:00
Ignacio Vera 59ae46f3f2
Wrap exception with SendRequestTransportException instead of TransportException (#73551)
Prevents login at WARN level underlaying 4xx exceptions.
2021-07-12 07:30:39 +02:00
Yang Wang b6fc5a2aef
[Test] More robust reloading test for file service tokens (#75203)
Instead relying on the countDownLatch, the entry assertion is now
perfomred in an assertBusy block so that non-atomic file update will not
cause failures.
2021-07-12 12:27:11 +10:00
Nhat Nguyen 5fb4c05095
Deprecate SimpleFS and replace it with NIOFS (#75156) (#75196)
SimpleFS is deprecated and will be removed in Lucene 9. This commit
deprecates SimpleFS in 7.x and uses NIOFS for SimpleFS in Elasticsearch
7.15 or later as it offers superior or equivalent performance to
SimpleFS.
2021-07-09 18:22:41 -04:00
Lisa Cawley 3c76bcb3a5
[DOCS] Fixes links to machine learning concepts (#75194) 2021-07-09 13:09:03 -07:00
Jim Ferenczi cd4e987412
Fix ccs wildcard pattern in _terms_enum API (#75190)
This change adds the support in the _terms_enum API for wildcard index
pattern that targets remote cluster with security enabled.

Closes #75152
2021-07-09 21:33:26 +02:00
Julie Tibshirani c9c5d1f84c Adjust version checks after sliced PIT backport 2021-07-09 12:24:20 -07:00
Dan Hermann 76ada61d8c
Upgrade Tika to 1.27 for ingest (#75191) 2021-07-09 14:03:02 -05:00
Rory Hunter d08b851a5b
Accept settings in snake case in Docker image (#74327)
Closes #74036. Since some orchestration platforms forbid periods in
environment variable names, allow Docker users to pass settings to ES
using an alternative name scheme. For example:

    bootstrap.memory_lock

...becomes:

    ES_BOOTSTRAP_MEMORY__LOCK

The setting name is uppercased, prefixed, all underscores are converted
to double underscores, and all periods are converted to underscores.
2021-07-09 19:46:58 +01:00
Stuart Tettemer e4df4d7205
Script: Def encoding parser (#74840)
Parse and validate the def encoding string.

Broken out of e26fa4e
2021-07-09 11:30:57 -05:00
Francisco Fernández Castaño abc7a4776d
Avoid auto following leader system indices in CCR (#72815)
Relates #67686
2021-07-09 18:08:41 +02:00
Christos Soulios 91a1591435
Add constraints to dimension fields (#74939)
This PR adds the following constraints to dimension fields:

    It must be an indexed field and must has doc values
    It cannot be multi-valued
    The number of dimension fields in the index mapping must not be more than 16. This should be configurable through an index property (index.mapping.dimension_fields.limit)
    keyword fields cannot be more than 1024 bytes long
    keyword fields must not use a normalizer

Based on the code added in PR #74450
Relates to #74660
2021-07-09 14:56:58 +03:00
Jim Ferenczi 95469c3ba2
Fix _terms_enum default indices options (#75172)
This commit changes the default indices options of the new terms enum API
to be consistent with _search.
This change also fixes the shards statistics in the response when ccs is involved.

Closes #75155
2021-07-09 13:36:03 +02:00
Martijn van Groningen 9780f674ac
Improve stability of GeoIpDownloaderIT test suite. (#74558)
Adjust GeoIpDownloaderIT test suit to wait for managed databases files
to be removed after each test.

After each test geoip downloader is disabled,  which should eventually
remove the managed geoip database files. This happens in the background.
However a new test starts that assumes that the builtin databases are used
then that test can fail, because expected assertions will fail. The changes
in this commit should address this.

Closes #74358
2021-07-09 11:53:53 +02:00
Przemyslaw Gomulka 1b0ef6a5de
[Rest Api Compatibility] Dummy REST action for indices.upgrade api (#75136)
indices upgrade api (/_upgrade or /{index}/_upgrade) was removed and _reindex is suggested to be used instead.
There is no easy way to translate _upgrade request to _reindex requests. The dummy Upgrade action will return an exception to a user with a message indicating that _reindex should be used.

upgrade api removal #64732
relates #51816
2021-07-09 10:44:45 +02:00
David Turner 2eb131d61a
testFailedTasksCount: report whether task completes (#75167)
Investigatng #69731, this commit adds a check to report whether the
unexpected task that causes the test failure eventually completes.
2021-07-09 09:16:49 +01:00
André Pessanha bb37e09d92
Rename field_masking_span to span_field_masking (#74718)
`field_masking_span` is the only span query that does not begin with
`span_`.  This commit deprecates the existing name and adds a new
name `span_field_masking` to better fit with the other queries.
2021-07-09 08:56:38 +01:00
Ignacio Vera bdc77da2fb
Do not reuse the SetBackedScalingCuckooFilter during merging (#75111)
Fixes an IAE that is thrown when the underlaying circuit breaker is closed.
2021-07-09 09:16:45 +02:00
Lyudmila Fokina 063a1f2d30
Filter out CA PrivateKeyEntry when creating a KeyManager (#73807)
In 8.0, with security on by default, we store the HTTP
layer CA PrivateKeyEntry in the http.ssl keystore (along
with the node certificate) so that it is available in our
Enrollment API transport actions.
When loading a keystore, the current behavior is that the
X509ExtendedKeyManager will iterate through the PrivateKeyEntry
objects and will return the first key/certificate that satisfies
the requirements of the client and the server configuration,
and lacks any additional logic/filters.
We need the KeyManager to deterministically pick the node
certificate/key in all cases as this is the intended entry to be
used for TLS on the HTTP layer.
This change introduces filtering when creating the in-memory
keystore the KeyManager is loaded with, so that it will not
include PrivateKeyEntry objects when:
- there are more than 1 PrivateKeyEntry objects in the keystore
- The leaf certificate associated with the PrivateKeyEntry is a
CA certificate
Related: #75097

Co-authored-by: Ioannis Kakavas <ioannis@elastic.co>
2021-07-09 00:53:20 +02:00
Julie Tibshirani cdf67e0fd5
Support search slicing with point-in-time (#74457)
This PR adds support for using the `slice` option in point-in-time searches. By
default, the slice query splits documents based on their Lucene ID. This
strategy is more efficient than the one used for scrolls, which is based on the
`_id` field and must iterate through the whole terms dictionary. When slicing a
search, the same point-in-time ID must be used across slices to guarantee the
partitions don't overlap or miss documents.

Closes #65740.
2021-07-08 15:33:41 -07:00
Joe Gallo b9ad014174
Use interval.getStringRep for ReportingAttachment's interval (#75146)
Using getStringRep here rather than (implicitly) toString so that the
interval is serialized exactly as it was provided, rather than
converting to some other human readable form.
2021-07-08 14:47:13 -04:00
Andrei Dan 7b08a27775
Migrate to data tiers fix for phase with deactivated migrate action (#75102)
* Migrate to data tiers fix for phase with deactivated migrate action

This fixes the migration to also take into account explicitly deactivated
migrate actions. A phase with both an allocate action (which we update
to not contain routing rules anymore) and a deactivated migrate action
will not configure any allocation routing rules.

This changes the migrate service to also enable the migrate action.

* Remove the deactivated migrate action

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-07-08 12:08:07 -04:00
David Turner 915f9f5236
Yet more logging for testFailedTasksCount (#75143)
Relates #69731
2021-07-08 16:39:19 +01:00
Alan Woodward 5c5f377dc4
SearchModuleTests uses wrong check for deprecated query names (#74906)
SearchModuleTests checks through a list of queries that it expects to be
registered, and separately checks a through a list of queries that have
not been deprecated. This second check filters out non-deprecated
queries by seeing if they have deprecated names; but this will miss queries
that have been renamed (for example, we plan to rename field_masking_span
to span_field_masking, and this query will be perfectly valid but have a
deprecated name). This commit changes the filter to check that there are
any undeprecated names instead.
2021-07-08 15:50:29 +01:00
István Zoltán Szabó 6a4de77e11
[DOCS] Adds classification and regression links back to DFA docs. (#74930) 2021-07-08 16:37:16 +02:00
Andrei Dan 2ffd09d899
Fix IndexLifecycleRunnerTests.testRunAsyncActionReturningFalseEntersError (#75125)
Avoid ConcurrentModificationException by using a thread safe collection
in the test, as we write to the ILM history store in an async way.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-07-08 10:08:44 -04:00
David Roberts ba6278a72c
[ML] Add license key check argument to pytorch_inference (#75135)
Same change as #75134, but only for the master branch.
2021-07-08 10:01:38 -04:00
David Roberts 6de4d35750
[ML] Adding license key check arguments (#75134)
From version 7.15 the ML native processes will have
a command line option to confirm that a valid Elastic
license key is installed when they are started.

This change adds the necessary argument for the autodetect,
normalize and data_frame_analyzer processes.
2021-07-08 09:46:39 -04:00
David Kyle faafdf70a8
[ML] Limit the input sequence length for NLP processors (#74905)
BERT models have a limit on the length of the input sequence (the number of tokens
in the tokenized string rather than the input string) and throw an error if that length 
is exceeded. This PR adds a check on the tokenized string and throws a bad request
exception with a clear error message if the input is too large.

The max length defaults to 512 but is configurable via the max_sequence_length field 
in the task config.
2021-07-08 13:49:12 +01:00
Felix Barnsteiner 0a8f725647
Support for wildcards and override option for dot_expander processor (#74601) 2021-07-08 14:39:27 +02:00
Felix Barnsteiner 404e9865b6
Json processor: add_to_root_conflict_strategy option (#74967) 2021-07-08 14:36:22 +02:00
David Roberts d9ff10adf6
Adjusting persistent task local abort supported version after backport (#75067)
This change adjusts the supported version added in #74115
following the backport to 7.15.0 that was done in #75002.

It is possible to remove far more code from master following
the backport, however, this would make the ML change to use
the functionality harder as then that would need substantial
changes during its backport.  It will be easier to make the
ML change that uses the functionality while master still has
the concept of supported/not supported for this functionality,
then do a final followup PR that removes the unnecessary code
from master.
2021-07-08 13:26:03 +01:00
Armin Braun 15f6cfe6e1
Dry Up XContent Parser Construction (#75114)
Cleanup duplication in how we parse byte arrrays directly.
2021-07-08 14:14:19 +02:00
David Roberts 61a7dcac85
Fix persistent task local abort integration test (#75121)
Fixes a race condition where the tasks API may report
local tasks before the published cluster state contains
their corresponding persistent tasks.
2021-07-08 12:59:48 +01:00
Armin Braun a6bdca72ee
Remove Outdated BwC Code from o.e.a.fieldcaps (#75107)
Follow up to #75022 removing now outdated BwC code from `8.x` + some additional related dead BwC removal.
In `7.x` we can't drop the index-level transport action I think because of technical
BwC with the transport client so this is just an 8.x PR.
2021-07-08 13:58:08 +02:00
David Roberts 37b66dd49a
Mute BWC tests for backport of persistent task local abort changes (#75115)
Temporarily muting BWC tests to allow #75002 to be merged.
Once this is merged to 7.x the BWC tests on master will be
reenabled in #75067.

Relates #74115
2021-07-08 11:27:31 +01:00
David Roberts 0f493c3938
[ML] Fix race condition between job open, close and kill (#75113)
This is a followup to #74976.

The changes of #74976 reverted many of the changes of #71656
because #74415 made them redundant. #74415 did this by making
killed jobs as closing so that the standard "job closed immediately
after open" functionality was used instead of reissuing the kill
immediately after opening. However, it turns out that this
"job closed immediately after open" functionality is not
perfect for the case of a job that is killed while it is opening.
It causes AutodetectCommunicator.close() to be called instead
of AutodetectCommunicator.killProcess(). Both do a lot of the
same things, but AutodetectCommunicator.close() finalizes
the job, and this can cause problems if the job is being killed
as part of a feature reset.

This change reinstates some of the functionality of #71656
but in a different place that hopefully won't reintroduce the
problems that led to #74415.

We can detect that a kill has happened early on during an
open or close operation by checking if the task's allocation
ID has been removed from the map after ProcessContext.setDying()
returns true. If ProcessContext.setDying() returns true this
means the job has not been previously closed, so it must have
been killed. Then we can call AutodetectCommunicator.killProcess()
instead of AutodetectCommunicator.close() during the cleanup
that happens when we detect that a recently started process is
no longer wanted.

Relates #75069
2021-07-08 06:18:57 -04:00
Ioannis Kakavas 62a6db957b
Remove redundant method from StoreKeyConfig (#74836)
StoreKeyConfig#x509Certificates was introduced in #72207 in order
to retrieve all certificates from the keystore used for HTTP TLS
and then filter out to get the CA certificate. Since we explicitly
add the CA key/cert as a PrivateKeyEntry on startup, we can
iterate on the PrivateKeyEntry objects instead.
2021-07-08 12:34:42 +03:00
Ioannis Kakavas f261254a9e
Disable testing conventions task in ilm-qa in FIPS (#75072)
We disable all these tests in FIPS mode in this QA project so
Testing conventions task fails with
Testing conventions [Test classes are not included in any enabled task ():
org.elasticsearch.xpack.ilm.CCRIndexLifecycleIT] are not honored

This change disables Testing Conventions check in FIPS mode for
the specific QA project
2021-07-08 12:22:16 +03:00
Przemyslaw Gomulka 1f726800a6
[Rest Api Compatibility] Clean up x-pack/plugin rest compat tests (#74701)
this PR removes tests which are not meant to be fixed (ml/, vectors/) to a separate "not to be fixed list" so that we can see which compatible changes are meant to be implemented.

relates #51816
2021-07-08 11:04:55 +02:00