Commit Graph

21 Commits

Author SHA1 Message Date
Andriy Redko 8bf6fa6b4f
Support Gradle 7 (#1609)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-11-29 14:34:06 -05:00
Vacha 3f6e1df9eb
Fixing bwc test for repository-multi-version (#1441)
Signed-off-by: Vacha <vachshah@amazon.com>
2021-10-27 10:41:13 -04:00
Nick Knize d821b15a6b
[BWC] fix mixedCluster and rolling upgrades (#775)
This commit fixes mixedCluster and rolling upgrades by spoofing OpenSearch
version 1.0.0 as Legacy version 7.10.2. With this commit an OpenSearch 1.x node
can join a legacy (<= 7.10.2) cluster and rolling upgrades work as expected.
Mixed clusters will not work beyond the duration of the upgrade since shards
cannot be replicated from upgraded nodes to nodes running older versions.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>

Co-authored-by: Shweta Thareja <tharejas@amazon.com>
2021-05-28 00:42:57 -05:00
Nick Knize 9168f1fb43
[License] Add SPDX and OpenSearch Modification license header (#509)
This commit adds the SPDX Apache-2.0 license header along with an additional
copyright header for all modifications.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-09 14:28:18 -05:00
Harold Wang a011c15bc8 Rename files under qa folder (#212)
* Rename directory elasticsearch to opensearch
Rename EvilElasticsearchCliTests EvilOpenSearchCliTests

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename org.elasticsearch to org.opensearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename waitForElasticsearch to waitForOpenSearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename OpensearchNode to OpenSearchNode

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename "elasticsearch.version" to "opensearch.version"

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearchVersionString to opensearchVersionString

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch.yml to opensearch.yml

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename runElasticsearchTests to runOpenSearchTests

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearchVersion to opensearchVersion

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch to opensearch in gradle files

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename ElasticsearchAssertions to OpenSearchAssertions

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename folder share/elasticsearch to share/opensearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch to opensearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch-service-x64 to opensearch-service-x64

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch-service.bat to opensearch-service.bat

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename Elasticsearch to Opensearch
Rename elasticsearch to opensearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename ELASTIC_PASSWORD_FILE to OPENSEARCH_PASSWORD_FILE

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename ELASTICSEARCH_PASSWORD to OPENSEARCH_PASSWORD
Rename elasticsearch to opensearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch to opensearch

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch.log to opensearch.log

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename es-repo to opensearch-repo

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename ESTestCase to OpenSearchTestCase

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename ESRestTestCase to OpenSearchRestTestCase

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch to opensearch
Rename "Starts ElasticSearch" to "Starts OpenSearch"

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename ESElasticsearchCliTestCase to BaseOpenSearchCliTestCase

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename "elasticsearch:test" to "opensearch:test"

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename test91ElasticsearchShardCliPackaging to test91OpenSearchShardCliPackaging

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch.toString to opensearch.toString

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename elasticsearch.pid to opensearch.pid

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename "Opensearch" to "OpenSearch"
Rename "elasticsearch" to "opensearch"

Signed-off-by: Harold Wang <harowang@amazon.com>

* Rename Elasticsearch to OpenSearch
Remove unecessary dot after opensearch.

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Harold Wang 844e56abf3 [Rename] Rename files under "qa" folder (#194)
* [Rename] Rename qa folder

Signed-off-by: Harold Wang <harowang@amazon.com>

* Remove the dot in the end of "package org.opensearch."

Signed-off-by: Harold Wang <harowang@amazon.com>

* Add semicolon

Signed-off-by: Harold Wang <harowang@amazon.com>
2021-03-21 20:56:34 -05:00
Nick Knize 64d7e7e9ca [Rename] ElasticsearchStatusException in server module (#172)
This commit refactors the ElasticsearchStatusException in the server module to
OpenSearchStatusException. References and usages throughout the rest of the
codebase are fully refactored.

Signed-off-by: Nicholas Knize <nknize@amazon.com>
2021-03-21 20:56:34 -05:00
Rene Groeschke f58ebe58ee
Use services for archive and file operations in tasks (#62968) (#63201)
Referencing a project instance during task execution is discouraged by
Gradle and should be avoided. E.g. It is incompatible with Gradles
incubating configuration cache. Instead there are services available to handle
archive and filesystem operations in task actions.

Brings us one step closer to #57918
2020-10-05 15:52:15 +02:00
Rene Groeschke bdd7347bbf
Merge test runner task into RestIntegTest (7.x backport) (#60600)
* Merge test runner task into RestIntegTest (#60261)
* Merge test runner task into RestIntegTest
* Reorganizing Standalone runner and RestIntegTest task
* Rework general test task configuration and extension
* Fix merge issues
* use former 7.x common test configuration
2020-08-04 14:46:32 +02:00
Rene Groeschke ed4b70190b
Replace immediate task creations by using task avoidance api (#60071) (#60504)
- Replace immediate task creations by using task avoidance api
- One step closer to #56610
- Still many tasks are created during configuration phase. Tackled in separate steps
2020-07-31 13:09:04 +02:00
Armin Braun d456f7870a
Deduplicate Index Metadata in BlobStore (#50278) (#59514)
This PR introduces two new fields in to `RepositoryData` (index-N) to track the blob name of `IndexMetaData` blobs and their content via setting generations and uuids. This is used to deduplicate the `IndexMetaData` blobs (`meta-{uuid}.dat` in the indices folders under `/indices` so that new metadata for an index is only written to the repository during a snapshot if that same metadata can't be found in another snapshot.
This saves one write per index in the common case of unchanged metadata thus saving cost and making snapshot finalization drastically faster if many indices are being snapshotted at the same time.

The implementation is mostly analogous to that for shard generations in #46250 and piggy backs on the BwC mechanism introduced in that PR (which means this PR needs adjustments if it doesn't go into `7.6`).

Relates to #45736 as it improves the efficiency of snapshotting unchanged indices
Relates to #49800 as it has the potential of loading the index metadata for multiple snapshots of the same index concurrently much more efficient speeding up future concurrent snapshot delete
2020-07-14 22:18:42 +02:00
Rene Groeschke 01e9126588
Remove deprecated usage of testCompile configuration (#57921) (#58083)
* Remove usage of deprecated testCompile configuration
* Replace testCompile usage by testImplementation
* Make testImplementation non transitive by default (as we did for testCompile)
* Update CONTRIBUTING about using testImplementation for test dependencies
* Fail on testCompile configuration usage
2020-06-14 22:30:44 +02:00
Armin Braun 8805c1f112
Manually Craft CreateSnapshotRequest to fix BwC Test (#57661) (#57715)
We can't use the high level create snapshot request any longer
since we changed some of its default parameters in `8` and those
are not understood by older versions like `7.4`.

Closes #57650
2020-06-05 15:49:44 +02:00
Rene Groeschke c29bc87040
Move bwcVersions extension property to BuildParams (back port) (#56381)
* Move bwcVersions extension property to BuildParams (#56206)
* Fix :qa Task Using Broken BwC Versions Resolution (#56332)

Co-authored-by: Armin Braun <me@obrown.io>
2020-05-11 09:39:13 +02:00
Mark Vieira 4b528d97ad
Consolidate duplication of BWC testing task setup in script plugin (#53079)
(cherry picked from commit 33fc8e7ebfac8d47a5f9f026b3836bb47bea141a)
2020-03-03 14:43:02 -08:00
Armin Braun 4bb780bc37
Refactor Inflexible Snapshot Repository BwC (#52365) (#52557)
* Refactor Inflexible Snapshot Repository BwC (#52365)

Transport the version to use for  a snapshot instead of whether to use shard generations in the snapshots in progress entry. This allows making upcoming repository metadata changes in a flexible manner in an analogous way to how we handle serialization BwC elsewhere.
Also, exposing the version at the repository API level will make it easier to do BwC relevant changes in derived repositories like source only or encrypted.
2020-02-21 09:14:34 +01:00
Mark Vieira 8d2370bf00
Always use bundled JDK for external cluster nodes when BWC testing (#51505) (#51701) 2020-01-30 14:35:43 -08:00
Armin Braun c794803e3d
Fix X-Pack Indices Breaking Repository BwC Tests (#51120) (#51125)
If some internal `.watcher` or so index gets created during these tests
then the shard counts on snapshot restores and creates won't match up with expectations.
Fixed by only creating the snapshot for the test index

Closes #50819
2020-01-16 21:52:57 +01:00
Armin Braun dd09dc7af6
Fix MultiVersionRepository BwC Tests (#51006)
* Fix MultiVersionRepository BwC Tests

The HLRC doesn't like what its getting back from some older 6.x versions for the restore status
so I moved that request to the low level client.
Closes #50819
2020-01-15 15:19:08 +01:00
Armin Braun 609b015e3c
Prevent Old Version Clusters From Corrupting Snapshot Repositories (#50853) (#50913)
Follow up to #50692 that starts writing a `min_version` field to
the `RepositoryData` so that pre-7.6 ES versions can not read it
(and potentially corrupt it if they attempt to modify the repo contents)
after the repository moved to the new metadata format.
2020-01-13 15:02:53 +01:00
Armin Braun f70e8f6ab5
Fix Snapshot Repository Corruption in Downgrade Scenarios (#50692) (#50797)
* Fix Snapshot Repository Corruption in Downgrade Scenarios (#50692)

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snapshots in the repository that require the old-format metadata to be restorable.
2020-01-09 21:21:13 +01:00