Commit graph

9320 commits

Author SHA1 Message Date
Rene Groeschke
8ce680ff4a
Mute SamlAuthenticationIT on 7.17 branch (#106993) 2024-04-02 14:51:40 +02:00
Slobodan Adamović
59f0e6f091
[Test] Fix SslMultiPortTests by increasing the number of ephemeral ports on windows (#106540)
This PR increases client's port ranges for tests which are executed on
Windows in order to avoid failures due to some port ranges being
excluded from use. The larger ports range (300) is chosen based on the
observation where a random consecutive range of 200 ports can be
excluded on Windows test workers.

Relates to https://github.com/elastic/elasticsearch/pull/103894, which
fixed similar issues but this one seems to have been missed.

Resolves: https://github.com/elastic/elasticsearch/issues/106537
2024-03-20 08:28:03 -04:00
Niels Bauman
1175fc6cc8
Fix default search timeout in watcher docs (#106404) (#106504) 2024-03-19 15:07:03 -04:00
Youhei Sakurai
057843e7d6
[7.17] Handling exceptions on watcher reload (#105442) (#106209) 2024-03-13 15:54:38 -05:00
Jake Landis
334d7f5026
OIDC doc - mention client secret needs a restart (#106088) (#106090) 2024-03-07 16:21:14 -05:00
Moritz Mack
63eeed8374
Fix random timezone id selection to be consistent with DateUtilsTests.testTimezoneIds (#105989) 2024-03-06 07:35:15 +01:00
David Roberts
edea203e7c
[ML] Detect 8.x ML nodes correctly (#105653)
It's possible that a 7.17 master node needs to assign ML jobs
to 8.x ML nodes. Currently this does not work, as the 7.x mechanism
for detecting ML nodes does not work with 8.x ML nodes. Currently
a 7.17 master node will not assign jobs to 8.x ML nodes, so the
jobs sit in limbo until the master node is upgraded to 8.x, and
then they get assigned and pick up where they left off.

This change allows the 7.17 master node to correctly identify 8.x
ML nodes in the cluster, allowing the ML jobs to be reassigned
more quickly during a rolling upgrade from 7.17 to 8.x where
master nodes are upgraded last (as recommended).
2024-02-20 13:42:46 +00:00
Brian Seeders
2ccd7bf00e
Renew samba fixture expired test certificates (#105561) (#105568)
(cherry picked from commit 15877f5593)
2024-02-15 10:43:53 -05:00
Jake Landis
6e0679d6d1
[7x] upgrade aws client depdencies (#104346)
This commit bumps the aws client dependencies from from 1.11.749 to
1.12.270.  This aligns the versions used in 7.17.x with main. 

(partial) backport of
https://github.com/elastic/elasticsearch/pull/88932
2024-01-22 10:52:12 -05:00
Jake Landis
2aeecfd084
[7.17] Manual backport of 103944 (#104016)
* Manual backport of 103944

* copy RegisteredDomainProcessorTests#testBasic from main
2024-01-08 11:31:01 -05:00
Jake Landis
77bf12f0a0
Upgrade Bouncy Castle jars (except for the FIPS jars) (#103818)
This commit upgrades the non-FIPS jars to the lastest available versions for 7.17.

Bouncy Castle slightly changed their naming as evident by bouncycastle.org/latest_releases.html
They no longer maintain a jdk15on library and instead use strategy for [1.5->1.8) and [1.8 -> ). This commit
adopts the jdk18on libraries with the latest version.

related: #100923
2024-01-05 16:32:05 -06:00
Slobodan Adamović
68e2508349
[7.17] [Test] Use larger client ports range for tests running on Windows (#103894) (#103914)
* [Test] Use larger client ports range for tests running on Windows (#103894)

This PR increases client's port ranges for tests which are executed
on Windows in order to avoid failures due to some port ranges being
excluded from use. The larger ports range (300) is chosen based on
the observation where a random consecutive range of 200 ports can
be excluded on Windows test workers.

Closes #102349

(cherry picked from commit bdf5c7fc38)

# Conflicts:
#	modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/transport/netty4/Netty4TransportMultiPortIntegrationIT.java
#	x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java

* Fix compilation error
2024-01-04 10:00:23 -05:00
Mary Gouseti
253f1f430f
[7.17] [ILM] More resilient when a policy is added to searchable snapshot (#102741) (#103070)
* Backport #102741
2023-12-06 20:08:15 +02:00
Przemysław Witek
b9fe9073e5
[Transform] Ensure transform updates only modify the expected transform task (#102934) (#102941)
(cherry picked from commit 67ab4b46ea)

# Conflicts:
#	x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/UpdateTransformActionRequestTests.java
2023-12-04 14:06:18 -05:00
Jake Landis
5bb05c343a
Remove verbose debug logger (#102318) (#102421)
This commit removes a debug logger which can be overly verbose.

(cherry picked from commit 19a762b8f5)
2023-11-21 11:18:39 -05:00
David Turner
8206af4c8f AwaitsFix for #101462 2023-11-03 17:28:11 +00:00
Athena Brown
36e5d261b9
Unmute PkiAuthDelegationIntegTests (#101280) (#101351)
These tests were muted both at the suite level as well as at the test level
for reasons I don't fully understand, and then were unmuted at one level
but not the other. They don't appear to fail after a few thousand runs,
so this PR unmutes them the rest of the way.
2023-10-25 17:51:31 -04:00
Brian Seeders
92682277ba
[buildkite] Remove idp-fixture docker-compose wait and bump check task agent memory (#101059) (#101075) 2023-10-18 12:04:18 -04:00
Mary Gouseti
b249462795
[7.17] WaitForSnapshotStep verifies if the index belongs to the latest snapshot of that SLM policy (#100911) (#101030)
* `WaitForSnapshotStep` verifies if the index belongs to the latest snapshot of that SLM policy (#100911)

The `WaitForSnapshotStep` used to check if the SLM policy has been
executed after the index has entered the delete phase, but it did not
check if the SLM policy included this index.

The result of this is that if the user used an SLM policy that did not
include this index, when the index would enter the
`WaitForSnapshotStep`, it would wait for a snapshot to be taken, a
snapshot that would not include the index, and then ILM would delete the
index.

See the exact reproduction path:
https://github.com/elastic/elasticsearch/issues/57809

**Solution** This PR, after it finds a successful SLM run, it verifies
if the snapshot taken by SLM contains this index. If not it throws an
error, otherwise it proceeds.

ILM explain will report:

```
"step_info": {
        "type": "illegal_state_exception",
        "reason": "the last successful snapshot of policy 'hourly-snapshots' does not include index '.ds-my-other-stream-2023.10.16-000001'"
      }
```

**Backwards compatibility concerns** In this PR, the
`WaitForSnapshotStep` changed from `ClusterStateWaitStep` to
`AsyncWaitStep`. We do not think this is gonna cause an issue. This was
tested manually by the following steps: - Run a master node with the old
version. - When ILM is executing `wait-for-snapshot`, we shutdown the
node - We start the node again with the new version os ES - ES was able
to pick up the step and continue with the new code.

We believe that this covers bwc concerns.

Fixes: https://github.com/elastic/elasticsearch/issues/57809
(cherry picked from commit 5697fcf594)
2023-10-18 12:33:22 +03:00
Rene Groeschke
468bef1b9e
[7.17] Update gradle wrapper to 8.4 (#99856) (#100926)
* Remove deprecated forConfigurationTime usage
2023-10-17 13:44:48 +02:00
Rene Groeschke
a080bb2bbe
[7.17] Update gradle wrapper to 8.3 (#97838) (#100715)
* Update gradle wrapper to 8.3 (#97838)

Gradle now fully supports compiling, testing and running on Java 20.
Among other general performance improvements this release introduces --test-dry-run command line option that allows checking if tests are filtered or not by gradle.
Required updating nebula ospackage plugin as setuid was broken in gradle 8.3.

(cherry picked from commit b23e000c30)

# Conflicts:
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/LegacyYamlRestCompatTestPluginFuncTest.groovy
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaModulePathPlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/AbstractYamlRestCompatTestPlugin.java
#	build-tools-internal/src/main/resources/minimumGradleVersion
#	gradle/verification-metadata.xml
#	gradle/wrapper/gradle-wrapper.jar
#	gradlew
#	x-pack/plugin/watcher/qa/with-monitoring/src/javaRestTest/java/org/elasticsearch/smoketest/MonitoringWithWatcherRestIT.java

* [7.17] Use patched nebula os package gradle plugin

* Update testingconvention precommit integ test
2023-10-16 06:18:08 -04:00
Brian Seeders
7ef9572438
Add healthcheck for shibboleth-idp in idp-fixture (again) (#100461) (#100525)
(cherry picked from commit d0c263bfa6)

# Conflicts:
#	x-pack/test/idp-fixture/build.gradle
2023-10-09 16:53:43 -04:00
Ed Savage
baad6f6e6a
[7.17][ML] defend against negative datafeed start times (#100332)
* [ML] Defend against negative datafeed start times (#100284)

A negative start time in the datafeed can cause significant disruption
to an entire cluster. This PR checks that the start time is greater
than or equal to 0 and throws an exception otherwise.

* Adjust backported test for 7.17
2023-10-05 08:03:00 -04:00
James Baiera
eaef3a9d1d
Validate enrich index before completing policy execution (#100106) (#100160)
This PR adds a validation step to the end of an enrich policy run to ensure the integrity of the
enrich index that is about to be promoted.

(cherry picked from commit 225db3190a)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-10-03 11:25:43 -04:00
James Baiera
364c340a73
Show concrete error when enrich index not exist rather than NPE (#99604) (#100155)
There should be NullPointerException check and throw index not found exception to the response
so the user can understand what happens with the enrich index

---------

Co-authored-by: James Baiera <james.baiera@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit ccc896d128)

# Conflicts:
#	x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichCache.java
#	x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichCacheTests.java

Co-authored-by: puppylpg <shininglhb@163.com>
2023-10-02 16:54:07 -04:00
Rene Groeschke
5afd06ae57
[7.17] Update Gradle Wrapper to 8.2 (#96686) (#97484)
* Update Gradle Wrapper to 8.2 (#96686)

- Convention usage has been deprecated and was fixed in our build files
- Fix test dependencies and deprecation
2023-09-27 08:46:44 +02:00
Volodymyr Krasnikov
00b68250ab
Add some debug logs to IT test (#98461)
* Add some debug logs to IT test

* Output available index dirs on the node
2023-09-13 13:40:03 -07:00
Athena Brown
db1e5cc160
[Backport] Check ILM status before reporting node migration STALLED
This commit adjusts the behavior of the node shutdown status
calculation to avoid reporting a `STALLED` status when ILM is
in the process of doing something that might result in the
migration being temporarily stalled (at time of writing, that
means shrinking an index).

This check is only made if ILM is not stopped.

Backport of #98367
2023-09-12 16:01:56 -06:00
James Rodewig
56bb702d5a
[7.17] [DOCS] Fix double-slash in link (#99205) (#99244)
Closes https://github.com/elastic/platform-docs-team/issues/195
2023-09-06 09:55:27 -04:00
Tim Vernum
9d448a0f95
Introduce FilterRestHandler (#98922)
RestHandler has a number of methods that affect the behaviour of request
processing. If the handler is wrapped (e.g. SecurityRestFilter or
DeprecationRestHandler) then these methods must be delegated to the
underlying handler.

This commit introduces a new abstract base class `FilterRestHandler`
that correctly delegates these methods so that wrappers (subclasses) do
not need to implement the behaviour on a case-by-case basis

Backport of: #98861
2023-08-30 07:19:47 +10:00
Iraklis Psaroudakis
f7af19baaa
Fix autoexpand during node replace (#98891)
Prior to this change NodeReplacementAllocationDecider was unconditionally skipping both replacement source and target nodes when calculation auto-expand replicas. This is fixed by autoexpanding to the replacement node if source node already had shards of the index

Backport of PR #96281 amended for 7.17.x

Closes #89527

Co-authored-by: Ievgen Degtiarenko <ievgen.degtiarenko@elastic.co>
2023-08-28 10:15:54 +03:00
Albert Zaharovits
0df52c8f67
Netty4 HTTP authn enhancements (#92220) (#96703)
This is a backport of multiple work items related to authentication enhancements for HTTP,
which were originally merged in the 8.8 - 8.9 releases.
Hence, the HTTP (only the netty4-based implementation (default), not the NIO one) authentication
implementation gets a throughput boost (especially for requests failing authn).

Relates to: ES-6188 #92220 #95112
2023-08-23 18:52:38 +03:00
Volodymyr Krasnikov
bb57a0c81a
Increase timeout for waiting for the cleanup of the shared index folder (#98302) 2023-08-09 07:16:25 -07:00
Nikolaj Volgushev
83e916a9ec
Resolve conflict (#98311)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-09 09:45:25 -04:00
Jake Landis
2e2f3ad01a
[7.17] Update certs for PKI tests and re-enable tests (#97766) (#97988)
* Update certs for PKI tests and re-enable tests (#97766)

The certs for the PKI tests expired and the test was muted.
This commit follows the instructions in the read to update the certs and unmutes the test.
The certs will now expire 20 years from now.

fixes: #97756

* precommit
2023-07-26 20:52:17 -04:00
Andrei Dan
f0b7122b16
[7.17] Migrate to data tiers routing configures correct default for mounted indices (#97950)
* Migrate to data tiers routing configures correct default for mounted indices

(cherry picked from commit eaec9602a9c4a4b092f36fd35f58d1e4b8faca52)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>

* Add isExplicitDataTier method back as it's used in 7.17

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-07-26 05:11:10 -04:00
Iraklis Psaroudakis
e3b0c3d3c5
Mute some PkiAuthDelegationIntegTests (#97774) (#97779)
Relates #97772
2023-07-19 04:58:31 -04:00
Mark Vieira
df7528e88c
Fix import 2023-07-18 16:27:47 -07:00
Ryan Ernst
b526892f24
Muting pki tests until expired test certs are regenerated (#97757)
see https://github.com/elastic/elasticsearch/issues/97756
2023-07-18 16:08:27 -07:00
Ignacio Vera
a5433e375d
[7.17] Support for Byte and Short as vector tiles value tag (#97619) (#97673)
* Port lucene fix github-12352 to Elasticsearch 7.17

* Update docs/changelog/96721.yaml

* Support for Byte and Short as vector tiles value tag (#97619)

Byte and short data types are not supported by the vector tiles specification. If a user tries to add one of those, it
 actually gets ignored. This add s support to those values by casting them as integers. In addition it will throw an
exception if the value added is a type it cannot understand so it is not silently ignored.
# Conflicts:
#	x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/vector-tile/10_basic.yml
2023-07-13 21:59:53 -04:00
Slobodan Adamović
22ca339c4d
[7.17][DOC] Consistently reference indices parameter in API key examples (#97268)
Backports the following commits to 7.17:  - [DOC] Consistently reference
indices parameter in API key examples (#97174)
2023-06-30 04:03:59 -04:00
Lee Hinman
3ab042504d
Bump Guava from 30.1-jre to 32.0.1-jre (#97211) (#97255)
This bumps Watcher's Guava dependency to 32.0.1.
2023-06-29 17:01:21 -04:00
Volodymyr Krasnikov
32deaf9ff0
Update Guava dependency version to 32.0.1-jre (#97060)
* Update Guava dependency version to 32.0.1-jre

* Fix dependencies

* Remove direct dependencies on guava ver.31

* Revert "Remove direct dependencies on guava ver.31"

This reverts commit 1e90a271c2.
2023-06-27 11:09:50 -07:00
Przemysław Witek
68092d0fc4
[7.17] [Transform] Adding null check to fix potential NPE (#96785) (#97109) 2023-06-26 16:39:25 +02:00
Tanguy Leroux
4e3cc9bc0f
[7.17] Fix ESCCRRestTestCase.verifyAutoFollowMonitoring (#97054) (#97105)
The method `verifyAutoFollowMonitoring` searches for
`ccr_auto_follow_stats` documents in `monitoring-es-*` indices to see if
one document has the field `number_of_successful_follow_indices` greater
than 0.

If such document is found, it means that x-pack monitoring successfully
indexed documents about CCR stats and that CCR at that time had at least
1 following index successfully running.

But the current `verifyAutoFollowMonitoring` method only check the first
10 docs returned by the search requests. Recent failures of
`AutoFollowIT.testAutoFollowPatterns` on 7.17 branch indicates that more
than 10 docs were found, so I suspect one of them has
`number_of_successful_follow_indices` > 0 but is not returned in the
first 10 top docs.

This pull request changes the method to only count documents with
`number_of_successful_follow_indices` > 0.

Closes #91984
2023-06-26 08:46:57 -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
Pooya Salehi
e991438ea0
Remove EncryptedAzureBlobStoreRepositoryIntegTests (#96377)
Closes https://github.com/elastic/elasticsearch/issues/96246
2023-05-26 07:59:33 -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
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