Commit Graph

1635 Commits

Author SHA1 Message Date
Przemyslaw Gomulka c96139d006
[Rest Api Compatibility] Deprecate the use of synced flush (#75372)
synced flush is going to be replaced by flush. This commit allows to synced_flush api only in v7 compatibility mode.
Worth noting - sync_id is gone and won't be available in v7 responses from indices.stats

relates removal pr #50882
relates #51816
2021-07-28 14:17:49 +02:00
Mark Vieira 9d14bc91d7
Set netty available processors system property for tests globally (#75699) 2021-07-27 11:21:42 -07:00
Rory Hunter a21ca103b2
Wait for ES to finish startup during password tests (#75420)
Closes #74063.
2021-07-21 09:42:10 +01:00
Albert Zaharovits b9bc7a6f3f
Configure security for the initial node cli (#74868)
This introduces a new cmd line tool that generates the security configuration
for a new node in a new cluster (as opposed to joining an existing cluster).
The security configuration consists of TLS key and certificates, which
are stored in a directory inside the config path, as well as settings appended
to the elasticsearch.yml referencing the aforementioned certs.
2021-07-21 07:45:39 +03:00
Jake Landis 4553bf03d5
Remove MavenFilteringHack (#73637) 2021-07-20 17:05:16 -04:00
Armin Braun e7a668811d
Fix RestSnapshotsStatusCancellationIT (#75524)
Reused the fix from the other snapshot API test.

closes #75075
2021-07-20 14:14:53 +02:00
Ignacio Vera 87a0711044
Unmute RareTermsIT (#75169) 2021-07-12 17:33:44 +02: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
Luca Cavanna 623044ed70
[TEST] CCSDuelIT to not check successful shards (#75062)
CCSDuelIT sometimes fails due to an unexpected number of shards returned in the refresh response. We create an index with a certain number of shards and no replicas, and sometimes the number of shards refresh is higher by one than the shards we created. This is not symptom of a problem though, as we are checking that there are no failures, but rather indicates a relocation happening, during which both copies of the same shard have been refreshed.

Closes #61258
Closes #72637
Closes #67754
2021-07-07 17:32:14 +02:00
Ignacio Vera 488829f454
mute RareTermsIT (#74986) 2021-07-06 17:02:07 +02:00
Ignacio Vera 24ff395769
Remove Lucene's PackedInt dependency from Cuckoo filter (#74736)
Forks the Lucene data structure into a class called PackedArray that can be serialised using
Elasticsearch streams.
2021-07-06 06:17:16 +02:00
David Turner 0254dc3503
Warn on possible master service starvation (#74820)
Today the master service processes pending tasks in priority order. If
high-priority tasks arrive too frequently then low-priority tasks are
starved of access to the master service and are not executed. This can
cause certain tasks to appear to be stuck due to apparently-unrelated
overloads elsewhere.

With this commit we measure the interval between times when the pending
task queue is empty; if this interval exceeds a configurable threshold
then we log a warning.
2021-07-05 14:24:21 +01:00
Tim Brooks e25d70685e
Fix test compression setting upgrade tests (#74790)
This is related to #74755. The test to check that compression settings
are compatible after upgrade uses the cluster.remote prefix for remote
cluster settings. These settings did not exist in early versions of 6.x.
This commit adds an assume true to ensure that the test is not run
against older versions.
2021-07-01 11:07:24 -06:00
Armin Braun 2dd2945bab
Fix RestGetSnapshotsCancellationIT Failures (#74827)
Found this to be the easiest fix, the alternative would have been to actually
wait for all snapshot meta threads to become blocked but that's kind of hacky.

closes #74743
2021-07-01 16:04:36 +02:00
Rene Groeschke d8e4e48a3b
Avoid creating unused test tasks (#74644)
With the overall theme of trying to configure and add less to the build instead of just disabling it later,
we're replacing standalone-test by standalone-rest tasks avoids creating the
unused test tasks.

Standalone rest test plugin and the other rest test plugins behave a little bit different in the sense how source sets and test tasks are wired.

The standalone rest test plugin assumes that all RestTestTasks are using the same sourceSet (test). The yaml, java Rest test plugins use one dedicated sourceSet per test task.

In the long run we probably will migrate standalone-rest-test usages to one of the other plugins and deprecate standalone-rest-test
2021-06-30 14:11:25 +02:00
Armin Braun eca57352b5
Remove Outdated GetSnapshots BwC Handling in Rest Tests (#74734)
The group-by-repository response format is gone as a result of #74451
=> cleaning up its last remnants from REST tests.
2021-06-30 13:12:39 +02:00
Tim Brooks 293d490ded
Add additional transport compression options (#74587)
This commit is related to #73497. It adds two new settings. The first setting
is transport.compression_scheme. This setting allows the user to
configure LZ4 or DEFLATE as the transport compression. Additionally, it
modifies transport.compress to support the value indexing_data. When
this setting is set to indexing_data only messages which are primarily
composed of raw source data will be compressed. This is bulk, operations
recovery, and shard changes messages.
2021-06-29 12:14:47 -06:00
Yang Wang 221c31be3c
[Test] Bump password length to meet FIPS requirement (#74662)
Resolves: #74641
2021-06-29 22:23:04 +10:00
Armin Braun 5f89f8be3f
Introduce Next Field in Paginated GetSnapshots Response (#74236)
Follow up to #73952 adding documentation for the `after` query parameter
and the related `next` response field.
2021-06-28 22:28:30 +02:00
Jay Modi d4afd6a216
Protect newly introduced system indices fully (#74186)
This change updates the way we handle net new system indices, which are
those that have been newly introduced and do not require any BWC
guarantees around non-system access. These indices will not be included
in wildcard expansions for user searches and operations. Direct access
to these indices will also not be allowed for user searches.

The first index of this type is the GeoIp index, which this change sets
the new flag on.

Closes #72572
2021-06-24 14:13:57 -04:00
Armin Braun cbf48e0633
Flatten Get Snapshots Response (#74451)
This PR returns the get snapshots API to the 7.x format (and transport client behavior) and enhances it for requests that ask for multiple repositories.
The changes for requests that target multiple repositories are:
* Add `repository` field to `SnapshotInfo` and REST response
* Add `failures` map alongside `snapshots` list instead of returning just an exception response as done for single repo requests
* Pagination now works across repositories instead of being per repository for multi-repository requests

closes #69108
closes #43462
2021-06-24 16:58:33 +02:00
Rene Groeschke 59fb90487b
Simplify test only project precommit checks (#74172)
we do not need thirdparty check for test only projects
2021-06-22 16:34:07 +02:00
Martijn Laarman c412aaedee
Adds minimal traceparent header support to Elasticsearch (#74210)
This adds just enough support for the traceparent header to be useful in es8.
Since Elasticsearch already logs in ECS format extending it with support for transaction.id and trace.id is a quick win.
This allows us to surface server/deprecation slow logs from an instrumented application using the Trace Logs feature.
Parsing `traceparent` in http layer and populating tasks with `trace_id` which is preserved in thread context.
2021-06-21 16:27:59 +02:00
Yannick Welsch 632901f4a3
Allow opting out of known Lucene file extensions check (#74316)
Allows plugin developers of custom codecs to opt out of the assertion in LuceneFilesExtensionsTests that checks that all
encountered Lucene file extensions are known to this class. In the future, we would like to add a proper plugin extension
point for this.

Relates #74150
2021-06-21 09:15:21 +02:00
Armin Braun c1e9590a69
Pagination and Sorting for Get Snapshots API (#73952)
Pagination and snapshots for get snapshots API, build on top of the current implementation to enable work that needs this API for testing. A follow-up will leverage the changes to make things more efficient via pagination.

Relates https://github.com/elastic/elasticsearch/pull/73570 which does part of the under-the-hood changes required to efficiently implement this API on the repository layer.
2021-06-17 09:00:11 +02:00
Rory Hunter 47029736cf
Pin Alpine Linux version in Docker builds (#74169)
Alpine Linux 3.14.0 is incompatible with older versions of Docker, so pin the
version that we use to 3.13. At some point in the future, it will
be possible to upgrade Alpine.

Also when compiling curl, if the configure step fails and a config.log
file exists, then dump it out before exiting to assist diagnosis.
2021-06-16 14:29:00 +01:00
Rory Hunter a5d2251064
Order imports when reformatting (#74059)
Change the formatter config to sort / order imports, and reformat the
codebase. We already had a config file for Eclipse users, so Spotless now
uses that.

The "Eclipse Code Formatter" plugin ought to be able to use this file as
well for import ordering, but in my experiments the results were poor.
Instead, use IntelliJ's `.editorconfig` support to configure import
ordering.

I've also added a config file for the formatter plugin.

Other changes:
   * I've quietly enabled the `toggleOnOff` option for Spotless. It was
     already possible to disable formatting for sections using the markers
     for docs snippets, so enabling this option just accepts this reality
     and makes it possible via `formatter:off` and `formatter:on` without
     the restrictions around line length. It should still only be used as
     a very last resort and with good reason.
   * I've removed mention of the `paddedCell` option from the contributing
     guide, since I haven't had to use that option for a very long time. I
     moved the docs to the spotless config.
2021-06-16 09:22:22 +01:00
Rory Hunter ee98e8593b
Tighten up write permissions in Docker image (#73942)
Recursively remove write access from the bin, jdk, lib and
modules directories, since this access is not required, and removing
it makes it harder to exploit other issues in an ES distribution.
2021-06-11 13:31:49 +01:00
Armin Braun 38fa7b72f6
Dry up HTTP Smoke Tests around Snapshots (#73962)
Drying up a few spots of code duplication with these tests. Partly to
reduce the size of PR #73952 that makes use of the smoke test infrastructure.
2021-06-10 09:43:46 +02:00
Ryan Ernst ab1a2e4a84
Add precommit task for detecting split packages (#73784)
Modularization of the JDK has been ongoing for several years. Recently
in Java 16 the JDK began enforcing module boundaries by default. While
Elasticsearch does not yet use the module system directly, there are
some side effects even for those projects not modularized (eg #73517).
Before we can even begin to think about how to modularize, we must
Prepare The Way by enforcing packages only exist in a single jar file,
since the module system does not allow packages to coexist in multiple
modules.

This commit adds a precommit check to the build which detects split
packages. The expectation is that we will add the existing split
packages to the ignore list so that any new classes will not exacerbate
the problem, and the work to cleanup these split packages can be
parallelized.

relates #73525
2021-06-08 15:04:23 -07:00
Ryan Ernst 63012c8a40
Move ParseField to o.e.c.xcontent (#73923)
ParseField is part of the x-content lib, yet it doesn't exist under the
same root package as the rest of the lib. This commit moves the class to
the appropriate package.

relates #73784
2021-06-08 13:32:14 -07:00
Ryan Ernst 68817d7ca2
Rename o.e.common in libs/core to o.e.core (#73909)
When libs/core was created, several classes were moved from server's
o.e.common package, but they were not moved to a new package. Split
packages need to go away long term, so that Elasticsearch can even think
about modularization. This commit moves all the classes under o.e.common
in core to o.e.core.

relates #73784
2021-06-08 09:53:28 -07:00
Francisco Fernández Castaño 622d466c29
[CI] Unmute failing windows tests (#73898)
This commit reverts #73709 since #73837 has reverted the changes
that were causing these test failures.
2021-06-08 18:25:09 +02:00
Armin Braun f68566ed31
Make SnapshotStatusAction Cancellable (#73818)
Same as #72644. This is a much longer running action than normal
get snapshots even so it should definitely be cancellable.
Parallelization for this action will be introduced in a separate PR.
2021-06-07 13:40:56 +02:00
Mark Vieira f2f1867ae1 Fix test convention failures on Windows 2021-06-03 16:45:41 -07:00
Yang Wang 873095f58a
[CI] Mute failing tests for Windows (#73709) 2021-06-03 08:12:59 -07:00
Nhat Nguyen 1c3ca3ace5 Revert "Mute SearchStatesIT"
This reverts commit b6b6ceedd5.
2021-06-01 21:17:35 -04:00
Mark Vieira b6b6ceedd5 Mute SearchStatesIT 2021-06-01 16:22:40 -07:00
Rory Hunter 577010740e
Allow container restarts with file logging (#73101)
Closes #72702. It wasn't possible to restart an Elasticsearch Docker
container when using `ES_LOG_STYLE=file`, and now it is.
2021-05-14 20:40:27 +01:00
Rene Groeschke 2d42c26249
Keep StandaloneRestIntegTest task public (#72865)
This is used by hadoop
2021-05-09 11:36:16 +02:00
Rene Groeschke 78182686fc
Remove more usage of interal logic in public build api (#72858) 2021-05-08 23:06:23 +02:00
Rene Groeschke e609e07cfe
Remove internal build logic from public build tool plugins (#72470)
Extract usage of internal API from TestClustersPlugin and PluginBuildPlugin and related plugins and build logic

This includes a refactoring of ElasticsearchDistribution to handle types
better in a way we can differentiate between supported Elasticsearch
Distribution types supported in TestCkustersPlugin and types only supported
in internal plugins.

It also introduces a set of internal versions of public plugins.

As part of this we also generate the plugin descriptors now.

As a follow up on this we can actually move these public used classes into 
an extra project (declared as included build)

We keep LoggedExec and VersionProperties effectively public And workaround for RestTestBase
2021-05-06 14:02:35 +02:00
Armin Braun 70f1e8c33d
Make GetSnapshotsAction Cancellable (#72644)
If this runs needlessly for large repositories (especially in timeout/retry situations)
it's a significant memory+cpu hit => made it cancellable like we recently did for many
other endpoints.
2021-05-04 18:05:31 +02:00
Dan Hermann edf2f7d4d6
Unmute IndexingIT and TokenBackwardsCompatibilityIT tests (#72307) 2021-04-30 07:39:55 -05:00
Francisco Fernández Castaño 8997027f50
Add support for RestGetMapping cancellation (#72234) 2021-04-29 14:59:56 +02:00
Francisco Fernández Castaño 0583433c0f
Fix ClusterStateRestCancellationIT (#72407)
Take into account task cancellation for local requests too

Closes #72056
2021-04-29 14:40:57 +02:00
Rene Groeschke 17da1038fe
Port gradle script plugins to precompiled script plugins (#72361)
Script plugins cannot apply plugins and therefore wont work with porting
buildSrc to an included build as we plan. Therefore we take advantage
of moving our script plugins into precompiled script plugins.

As a limitation of this we ran into problems applying binary plugins
from script plugins and for now moved this out of those scripts.
2021-04-29 09:33:28 +02:00
Mark Vieira 6104438d6b
Fixes for package upgrade tests for versions prior to 7.7 (#72430) 2021-04-28 16:41:38 -07:00
Mark Vieira b818831c7e
Fixes for packaging upgrade tests (#72420) 2021-04-28 14:21:01 -07:00
Francisco Fernández Castaño 4e9f9ec64c
Add support for Rest XPackUsage task cancellation (#72304) 2021-04-28 18:16:31 +02:00