Commit graph

61175 commits

Author SHA1 Message Date
Nhat Nguyen
e1995a708a
Increase concurrent request of opening point-in-time (#96959)
* Increase concurrent request of opening point-in-time (#96782) (#96957)

Today, we mistakenly throttle the opening point-in-time API to 1 request
per node. As a result, when attempting to open a point-in-time across
large clusters, it can take a significant amount of time and eventually
fails due to relocated target shards or deleted target indices managed
by ILM. Ideally, we should batch the requests per node and eliminate
this throttle completely. However, this requires all clusters to be on
the latest version.

This PR increases the number of concurrent requests from 1 to 5, which
is the default of search.

* Fix tests

* Fix tests
2023-06-20 14:43:56 -04:00
Nikolaj Volgushev
1fe30f5d6b
[7.17] Update OIDC and JWT dependencies (#96862) (#96917)
* Update OIDC and JWT dependencies (#96862)

Updates internal dependencies for OIDC and JWT realms.

* Order

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-06-19 08:17:24 -04:00
Craig Taverner
edb34ad60b
Correct rare-terms default precision in docs (#96887) (#96907) 2023-06-18 16:08:27 -04:00
Ignacio Vera
2b42390ac2
Port lucene tessellator fix github-12352 to Elasticsearch 7.17 (#96721) 2023-06-14 10:42:13 +02:00
David Turner
969770f87c
Include targetNodeName in shutdown metadata toString() (#96765)
Reporting the `targetNodeName` was added to `main` in #78727 but omitted
from the backport in #78865. This commit adds the missing field to the
`toString()` response.
2023-06-12 15:58:19 +01:00
Ievgen Degtiarenko
b326926e76
Debug ccr connection failure in docs build (#96699) (#96719)
Set DEBUG log level to be able to troubleshoot failures to connect to local CCR cluster.
2023-06-09 03:16:07 -04:00
Ievgen Degtiarenko
3fc6eb6bdd
Fix AsyncShardFetchTests#testTwoNodesRemoveOne (#93734) (#96695)
This test was using the wrong `DiscoveryNodes`, but that mistake was
hidden by other leniency elsewhere in this test suite. This commit fixes
the test bug and also makes the test suite stricter.

Closes #93729

(cherry picked from commit 774e396ed5)

Co-authored-by: David Turner <david.turner@elastic.co>
2023-06-08 05:32:18 -04:00
Ryan Ernst
77b14999a2
Retry windows file deletes in packaging tests (#96630) (#96634)
We continue to have CI failures for open files when trying to cleanup on
Windows. This commit tries to account for one of those cases, where the
out/err redirects are cleaned up, opting to retry once after a delay.
2023-06-06 17:27:49 -04:00
David Turner
7c5d82d66b
Add one more consistency check in AsyncShardFetch (#96553) (#96557)
Relates #93632
2023-06-05 05:51:23 -04:00
David Turner
9a1ee48b3a
Fork TransportClusterHealthAction to MANAGEMENT (#96546)
This action can become fairly expensive for large states. Plus it is
called at high rates on e.g. Cloud which is blocking transport threads
needlessly in large deployments. Lets fork it to MANAGEMENT like we do
for similar CPU bound actions.

Backport of #90621 to 7.17

Co-authored-by: Armin Braun <me@obrown.io>
2023-06-05 09:14:21 +01:00
David Turner
6a755e3b00
Streamline AsyncShardFetch#getNumberOfInFlightFetches (#96545)
Avoids an O(#nodes) iteration by tracking the number of fetches directly.

Backport of #93632 to 7.17

Co-authored-by: luyuncheng <luyuncheng@bytedance.com>
2023-06-05 09:13:09 +01:00
David Turner
72afc2e314 Bring-your-own JDK docs improvements (#96404)
- Bury these docs a little more, there's no need for them to be on the landing page for "Set up Elasticsearch".

- Clarify the responsibilities for JDK updates.
2023-06-01 08:46:33 +01:00
Pooya Salehi
e991438ea0
Remove EncryptedAzureBlobStoreRepositoryIntegTests (#96377)
Closes https://github.com/elastic/elasticsearch/issues/96246
2023-05-26 07:59:33 -04:00
Ievgen Degtiarenko
3445e5b5c9
Fix testFollowerBehaviour (#96257) (#96269)
The test was failing when responseDelay == leaderCheckTimeoutMillis.
This resulted in scheduling both handling the response and timeout at the same
mills and executing them in random order. The fix makes it impossible to
reply the same time as request is timeout as the behavior is not deterministic
 in such case.
2023-05-23 03:10:41 -04:00
Keith Massey
fb243a9d18
Avoiding running IO on scheduler thread in ResourceWatcherService (#96251) (#96261) 2023-05-22 13:02:42 -04:00
Mark Vieira
59c1b19370
Use correct target compatibility for third party audit tasks (#94648) (#94652)
# Conflicts:
#	build-tools-internal/src/main/groovy/elasticsearch.runtime-jdk-provision.gradle

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-05-17 17:18:56 -04:00
Iraklis Psaroudakis
bf324b8235
Mute testAliasFields (#96153) (#96158)
Relates #93228
2023-05-16 09:16:31 -04:00
Tim Vernum
19d6efa282
[DOCS] Recommend API service tokens (over file) (#96091) (#96121)
File based service tokens were added to support orchestration
requirements in environments such as ECE and ECK. Outside of these
environments we recommend that API based tokens are used instead.

Resolves: #83491
2023-05-16 00:58:33 -04:00
Francisco Fernández Castaño
eb9e452058
[7.17] Fix Azure InputStream#read method (#96034) (#96045) 2023-05-12 18:36:32 +02:00
Mark Vieira
724c7d1333
Add SLES 15.4 to the docker exclusion list (#96037) (#96043)
Our docker exclusion list is sensitive to minor versions. With SLES 15.4
we need to explicitly add it to the exclusion list since it doesn't play
nicely with Docker in CI.

Closes https://github.com/elastic/elasticsearch/issues/93898
# Conflicts:
#	.ci/dockerOnLinuxExclusions
2023-05-11 13:00:25 -04:00
Tanguy Leroux
868373e2f4
[7.17] Cancel cold cache prewarming tasks if store is closing (#95891) (#96024)
Cold cache prewarming tasks are not stopped immediately when
the shard is closed, causing excessive use of disk for nothing.
This change adds a Supplier<Boolean> to prewarming logic that
can be checked before executing any consuming operation to know
if the Store is closing.

I'm not super happy with my test changes but the logic for
checking if prewarming works correctly is tricky.

Closes #95504
2023-05-11 07:50:56 -04:00
Andrei Dan
fc5e40b626
[ILM] Fix the migrate to tiers service and migrate action tiers configuration (#95934) (#95966)
The migrate action (although no allowed in the frozen phase) would seem
to convert `frozen` to `data_frozen,data_cold,data_warm,data_hot` tier
configuration. As the migrate action is not allowed in the frozen phase
this would never happen, however the code is confusing as it seems like
it could.

The migrate to data tiers routing service shared the code used by the
`migrate` action that converted `frozen` to
`data_frozen,data_cold,data_warm,data_hot` if it would encounter an
index without any `_tier_preference` setting  but with a custom node
attribute configured to `frozen` e.g. `include.data: frozen`

As part of https://github.com/elastic/elasticsearch/issues/84758 we have
seen frozen indices with the `data_frozen,data_cold,data_warm,data_hot`
tier preference however we could never reproduce it.

Relates to https://github.com/elastic/elasticsearch/issues/84758
2023-05-09 14:13:47 -04:00
Rene Groeschke
311f90e7ac
Update snyk ci job to use branch as target reference (#95794) (#95805) 2023-05-03 22:18:51 +02:00
Stef Nestor
dc9c1e13f9
[DOC] Move warning & explicate static setting (#81166)
* [DOC] Move warning & explicate static setting

Howdy! Small edits for user `CMD+F` ability & emphasis: explicates static setting (to explain why get errors if attempt to edit on existing index) & pulls CCR warning to top.

As non-code change curiosity, AFAICT all other static/dynamic settings that fit under modules are left to the child pages [from here](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#_static_index_settings) but [History retention](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-history-retention.html) seems to uniquely locate the info on the parent page and then reference it on a child page. Is this intended (asking because it breaks general flow)?
---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-05-03 06:42:48 -06:00
Bogdan Pintea
a7072e1931
Remove 'coming' notification in release notes (#95777)
Remove 'coming' notification in release notes.
2023-05-03 12:58:03 +02:00
Michal Junek
e4ad33760e
Fixes a typo in 7.0 migration guide (#95765) 2023-05-03 11:29:25 +02:00
Mark Vieira
008ba54e41
Prune changelogs after 7.17.10 release 2023-05-02 09:46:42 -07:00
Mark Vieira
90903324eb
Bump versions after 7.17.10 release 2023-05-02 09:45:33 -07:00
Abdon Pijpelink
d402f9cb67
[7.17] [DOCS] Clarify configuring indices/data streams used by stack monitoring (#95285) (#95587)
* [DOCS] Clarify configuring indices/data streams used by stack monitoring (#95285)

* [DOCS] Clarify indices/data streams using by stack monitoring

* Incorporate review feedback

* Update docs/reference/monitoring/indices.asciidoc

Co-authored-by: Kevin Lacabane <klacabane@gmail.com>

---------

Co-authored-by: Kevin Lacabane <klacabane@gmail.com>
(cherry picked from commit 2e31832c34)

* Add Elastic Agent monitoring
2023-04-28 14:42:42 +02:00
Armin Braun
38b70f65fb
Upgrade Netty to 4.1.89 (#95559)
Upgrading 7.17.x to the version we've been using in 8.x for a while to
resolve audit issues.
2023-04-28 10:26:15 +02:00
Bogdan Pintea
d13bda82c4
Add release notes for 7.17.10 (#95365)
Add release notes for 7.17.10
2023-04-24 16:56:16 +02:00
Tim Vernum
fecd68e315
[7.17] Bump bundled JDK to Java 20.0.1 (#95371) 2023-04-19 08:11:51 -07:00
Armin Braun
7284dd20c4
Deduplicate Heavy CCR Repository CS Requests (#91398) (#95372)
We run the same request back to back for each put-follower call during
the restore. Also, concurrent put-follower calls will all run the same
full CS request concurrently.
In older versions prior to https://github.com/elastic/elasticsearch/pull/87235
the concurrency was limited by the size of the snapshot pool. With that
fix though, they are run at almost arbitry concurrency when many
put-follow requests are executed concurrently.
-> fixed by using the existing deduplicator to only run a single remote
CS request at a time for each CCR repository.
Also, this removes the needless forking in the put-follower action that
is not necessary any longer now that we have the CCR repository
non-blocking (we do the same for normal restores that can safely be
started from a transport thread), which should fix some bad-ux
situations where the snapshot threads are busy on master, making
the put-follower requests not go through in time.
2023-04-19 09:10:05 -04:00
Athena Brown
2b42144b87
Correct Guava version used for OWASP Java HTML Sanitizer (#94442)
The OWASP Java HTML Sanitizer has a dependency on Guava,
specifically on version 30.1. However, prior to this PR,
we have been using 27.1. While this does not seem to have
caused any issues, we should still correct the problem.

(cherry picked from commit f2f45ad1cf)
2023-04-17 17:23:43 -06:00
Joe Gallo
a68e83a373 Fix ignore_missing docs for a couple of Ingest processors (#95244) 2023-04-13 16:36:37 -04:00
Nikolaj Volgushev
35885213d1
Bump version on internal OIDC depedency (#95142) (#95179)
Version bump for a third-party dependency for OIDC.
2023-04-13 14:55:50 +02:00
Pablo Alcantar Morales
50880a5d1b
fix typo in cron.asciidoc (#95181) (#95184) 2023-04-12 08:08:16 -04:00
Keith Massey
6a1c7e4c23
Fixing BulkProcessor2RetryIT (#95091) 2023-04-11 09:46:17 -05:00
Salvatore Campagna
d43aa81643
mute: testScrollWithDatetimeAndTimezoneParam (#95153) 2023-04-11 15:27:43 +02:00
Mark Vieira
68905df689
Add mechanism to initialize YAML tests against a subset of test cases (#95095) (#95097)
This commit adds the ability to initialize YAML rest test suites against
a subset of available test cases. Previously, the only way to do this is
via the `tests.rest.suite` system property, but that can only be set at
the test _task_ level. Configuring this at the test _class_ level means
that we can support having multiple test suite classes that execute
subsets of tests within a project. That allows for things like
parallelization, or having different test cluster setups for different
YAML tests within the same project.

For example:

```java
    @ParametersFactory
    public static Iterable<Object[]> parameters() throws Exception {
        return ESClientYamlSuiteTestCase.createParameters(new String[] { "analysis-common", "indices.analyze" });
    }
```

The above example would mean that only tests in the `analysis-common`
and `indices.analyze` directories would be included in this suite.

cc @jdconrad 

Closes #95089
2023-04-06 21:35:25 -04:00
Tim Vernum
f00bf45eb1
Reuse FieldPermissionsCache in Role parsing (#95065)
When parsing role descriptors, we ensure that the FieldPermissions
(`"field_security":{ "grant":[ ... ], "except":[ ... ] }`) are valid -
that is that any patterns compile correctly, and the "except" is a
subset of the "grant".

However, the previous implementation would not use the
FieldPermissionsCache for this, so it would compile (union, intersect
& minimize) automatons every time a role was parsed.

This was particularly an issue when parsing roles (from the security
index) in the GET /_security/role/ endpoint. If there were a large
number of roles with field level security the automaton parsing could
have significant impact on the performance of this API.

Backport of: #94931
2023-04-06 02:31:13 -04:00
Pooya Salehi
21329d47e1
[DOC] Specify upgrade order for tiers (#95022)
Outdated info in comparison to
https://www.elastic.co/guide/en/elastic-stack/8.7/upgrading-elasticsearch.html#upgrading-elasticsearch
2023-04-05 04:29:58 -04:00
David Turner
8035851a93 AwaitsFix for #94461 and #94329 2023-03-31 11:41:36 +01:00
David Turner
6413b2da91 AwaitsFix for #94941 2023-03-31 10:31:20 +01:00
Nhat Nguyen
47054bd6c5
[7.17] Closing an empty PIT should return 200 (#94708) (#94908)
* Closing an empty PIT should return 200 (#94708)

* Fix compilation
2023-03-30 14:46:22 -04:00
Abdon Pijpelink
21b4ea2a6d
[DOCS] clarify v7 file realm configuration (#94778)
* [DOCS] clarify v7 file realm configuration

* Update x-pack/docs/en/security/authentication/configuring-file-realm.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

---------

Co-authored-by: Yang Wang <ywangd@gmail.com>
2023-03-29 11:53:45 +02:00
Joe Gallo
ad68908f44
[7.17] Fix _cluster/stats .nodes.fs deduplication (#94843)
* Refactor _cluster/stats .nodes.fs deduplication (#94780)

* Fix FsInfo device deduplication (#94744)

* Fix _cluster/stats .nodes.fs deduplication (#94798)
2023-03-28 18:01:05 -04:00
James Baiera
9644135236
Fix async enrich execution prematurely releases enrich policy lock (#94702) (#94841)
This PR ups the timeout on the EnrichExecutor's task API call and adds additional logic in the event
that the task await call fails. Without this change, the task API call can timeout and unlock the policy
prematurely. Premature unlocking can lead to the index being removed while the policy is executing.

(cherry picked from commit f56fc01222)

# Conflicts:
#	x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutor.java
#	x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java
2023-03-28 14:43:50 -04:00
James Baiera
c40f7af6ff
[7.17] Refactor enrich maintenance coordination logic (#90931) (#94840)
This PR refactors the locking logic for enrich policies so that enrich index names are resolved early
so that they may be explicitly protected from maintenance tasks on the master node. The
maintenance service has been optimized to allow for concurrent removal of old enrich indices while
policies are executing. Further concurrency changes were made to improve the thread safety of the
system (such as removing the double check locking in maintenance and the ability to unlock
policies from code that does not hold the lock).

(cherry picked from commit 998520e111)
2023-03-28 14:03:17 -04:00
Mark Vieira
4ba72b4994 Don't check for beats updates in 7.17 branch 2023-03-28 07:33:29 -07:00