Commit Graph

54948 Commits

Author SHA1 Message Date
Daniel Doubrovkine (dB.) c63071b00f
Updated READMEs on releasing, maintaining, admins and security. (#853) (#950)
Signed-off-by: dblock <dblock@amazon.com>
2021-07-12 15:06:20 -05:00
Sooraj Sinha 2085fbcad6
Pass interceptor to super constructor (#876) (#937)
Signed-off-by: Sooraj Sinha <soosinha@amazon.com>
2021-07-12 11:48:09 -07:00
Marc Handalian f0a2c4f038
Add Snapshot maven repository (#941)
* backport PR #829 to 1.x branch, so that we can publish snapshots to our maven repository.
Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-07-07 11:00:05 -07:00
Nick Knize da6455d567
[BUG] Fix cat.health test failures in pre 1.0.0 mixed cluster test (#928) (#935)
Fixes the cat.health yaml failures when running in a bwc mixed cluster with
legacy (pre 1.0.0) nodes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-07-02 17:55:58 -05:00
Rabi Panda 5d07c256f9
Fix arm architecture translation issue (#809) (#927)
Found when attempting to build on an `arm64` machine when I recieved an error message below.  Root cause is that string equality in java cannot be done with the `==` sign.

```
unknown architecture [arm64] for jdk [provisioned_runtime], must be one of [aarch64, x64]
```

Signed-off-by: Peter Nied <petern@amazon.com>

Co-authored-by: Peter Nied <petern@amazon.com>
2021-07-02 17:19:44 -05:00
Marc Handalian 3c563fedd9
Update DistributionDownloader to support fetching arm64 bundles. (#929) (#934)
Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-07-02 15:02:47 -07:00
Rabi Panda 1f7df7adac
Update favicon for OpenSearch (#933)
Signed-off-by: Rabi Panda <pandarab@amazon.com>
2021-07-02 14:39:32 -07:00
Tianli Feng b383355f50
Refresh OpenSearch nodes version in cluster state after upgrade (#865) (#926)
Signed-off-by: Shweta Thareja <tharejas@amazon.com>
Co-authored-by: shwetathareja <shwetathareja@live.com>
2021-07-02 09:50:42 -07:00
Marc Handalian 36401d9edb
Fix Snapshot pattern in DistributionDownloader. (#916) (#920)
Snapshots are published with a -latest flag into s3, this updates
the pattern to correctly point to -latest.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-07-01 21:59:41 -05:00
Marc Handalian b749b38043
Remove distribution from main response in compatibility mode (#898) (#921)
This Change removes version.distribution when the version.number is
overridden with the cluster setting compatibility.override_main_response_version.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-07-01 21:57:36 -05:00
Tianli Feng 230f90b554
Add 'tagline' back to MainResponse in server that was removed in PR #427 (#913) (#914)
* Add "tagline" field back to "MainResponse" in sever side (not in rest-high-level-client side) that removed in PR #427 .
* Replace with a new tagline "The OpenSearch Project: https://opensearch.org/".
* Turn the tagline into a constant in server/src/main/java/org/opensearch/action/main/MainResponse.java.
2021-07-01 19:45:28 -07:00
Vacha 3ed6a2ec2a
Replace metadata keys in OpenSearchException during serialization and deserialization (#905) (#910)
Signed-off-by: Vlad Rozov <vrozov@users.noreply.github.com>

Co-authored-by: Vlad Rozov <vrozov@users.noreply.github.com>
2021-06-30 14:45:23 -07:00
Marc Handalian af4ad4fe8d
Update DistributionDownloader to fetch snapshots and staging bundles. (#904) (#907)
This change updates DistributionDownloader by registering a second
repository containing release-candidate bundles.  This repository will
only be checked if the release repository does not contain the requested
version.

This change also updates the snapshot repository to point to a new
snapshot repository.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-30 11:32:55 -07:00
Nick Knize 15e6cb4db5
Version bump for 1.1 release (#772) (#892)
Bumps the minor to 1.1 for the 1.0 release.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-06-28 12:57:03 -05:00
Marc Handalian f5199ee026
Add URL for lucene snapshots (#888)
Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-28 09:58:54 -05:00
Tianli Feng 6e5e1aeeec
update external library 'pdfbox' version to 2.0.24 to reduce vulnerability (#883) (#886) 2021-06-25 16:04:28 -07:00
Nick Knize 1a4c2915a3
[BUG] Fix versioning issues discovered through version bump (#884) (#887)
This commit fixes up the version framework to ensure a smooth version bump
across releases.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-06-25 17:08:37 -05:00
Marc Handalian a5fc4d4262
Add cluster setting to spoof version number returned from MainResponse (#847) (#870)
This change adds a new cluster setting "compatibility.override_main_response_version"
that when enabled spoofs the version.number returned from MainResponse
for REST clients expecting legacy version 7.10.2.

Signed-off-by: Marc Handalian <handalm@amazon.com>
2021-06-22 16:59:25 -05:00
Tianli Feng b1aa3671b5
Fix resource leak issues suggested by Amazon CodeGuru (#816) (#859)
* Add try-with-resources block to automatically close the resources after using to avoid resource leak, in `SymbolicLinkPreservingTarIT`, `LicenseAnalyzer`, `SymbolicLinkPreservingUntarTransform`, `ConcurrentSeqNoVersioningIT` in `VersionProperties`, `GeoFilterIT`, `XContentHelper`,  `Json` and `IndexShard` class

* Add try-finally block to close the resources after using to avoid resource leak, in `ServerChannelContext` class.

* Add try-catch block to close the resources when exception occurs in `FsBlobContainer` class (when XContentFactory.xContentType throws an exception).

* Close resources when assertion error occurs, in `ServerChannelContext` class.
2021-06-22 10:19:01 -07:00
itiyamas 006d04a60f
Decouple throttling limits for new and old indices. (#778) (#863)
* Decouple throttling limits for new and old indices.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Precommit fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments and test fix.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Checkstyle fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments.

Signed-off-by: Itiyama <itiyamas@amazon.com>
2021-06-17 14:39:49 +05:30
itiyamas fe40f8f360
Decouples primaries_recoveries limit from concurrent recoveries limit. (#546) (#862)
* Decouples initial primaries limit from node concurrent limits.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Checkstyle fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Checkstyle test fixes.

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Review comments

Signed-off-by: Itiyama <itiyamas@amazon.com>

* Fixes review comments.

Signed-off-by: Itiyama <itiyamas@amazon.com>
2021-06-17 13:45:37 +05:30
jayesh hathila f3d5340b33
Add Plugin name for verbose Plugin not found exception (#841)
* Add Plugin name for verbose Plugin not found exception
* Make the plugin loading failure exception more verbose
* Throw Opensearch in place of RuntimeException for plugin load failure

Signed-off-by: Jayesh Hathila <sharma.jayesh52@gmail.com>
2021-06-15 12:09:41 -04:00
Mohit Godwani 733d9c6f4b
Apply fix for health API response to distinguish no master (#819)
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
2021-06-04 11:28:57 +05:30
ashwinpankaj b4c697a29d
[1.x] An allocation constraint mechanism, that de-prioritizes nodes from getting picked for allocation if they breach certain constraints (#777)
* An allocation constraint mechanism, that de-prioritizes nodes from getting picked for allocation if they breach certain constraints

Signed-off-by: Ashwin Pankaj <appankaj@amazon.com>

* Precommit fixes

Signed-off-by: Ashwin Pankaj <appankaj@amazon.com>

* Fix license header in test file

Signed-off-by: Ashwin Pankaj <appankaj@amazon.com>

* Review comments

Signed-off-by: Ashwin Pankaj <appankaj@amazon.com>

Co-authored-by: Pankaj <appankaj@88665a1e205d.ant.amazon.com>
2021-06-04 10:47:47 +05:30
Rabi Panda 4f5b48f722
Enable BWC checks (#796) (#811)
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-06-03 15:09:12 -04:00
Daniel Doubrovkine (dB.) b45b613472
Version checks are incorrectly returning versions < 1.0.0. (#797) (#807)
* Version checks are incorrectly returning versions < 1.0.0.
* Removed V_7_10_3 which has not been released as of time of the fork.
* Update check for current version to get unreleased versions.

- no unreleased version if the current version is "1.0.0"
- add unit tests for OpenSearch 1.0.0 with legacy ES versions.
- update VersionUtils to include all legacy ES versions as released.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
Signed-off-by: dblock <dblock@amazon.com>
Co-authored-by: Rabi Panda <adnapibar@gmail.com>
2021-06-03 09:56:33 -04:00
Nick Knize 403c511c17
[BUG] fix MainResponse to spoof version number for legacy clients (#708)
This commit changes MainResponse to spoof OpenSearch 1.x version numbers as
Legacy version number 7.10.2 for legacy clients.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-05-28 10:05:33 -05:00
Nick Knize 053ed7b66d
[BWC] fix mixedCluster and rolling upgrades (#775) (#793)
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 08:02:43 -07:00
Rabi Panda 235cf29f90 Revert "Initial boilerplate for implementing the upgrade cli."
This reverts commit 3692d67c

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-26 11:54:59 -07:00
Rabi Panda 3692d67c1e Initial boilerplate for implementing the upgrade cli.
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-26 11:45:16 -07:00
Rabi Panda 96e16c68d6
Support running elasticsearch-oss distribution in test cluster for BWC (#764) (#774)
We need to install elasticsearch in the test cluster nodes to be able to run the BWC tests. This commit makes the following changes to enable that,
- updates DistributionDownloadPlugin to download elasticsearch-oss distributions.
- updates OpenSearchNode to be able to run both OpenSearch and Elasticsearch distributions.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-26 07:22:33 -07:00
Abbas Hussain 3cc8ab0d30
[CVE] Upgrade dependencies for Azure related plugins to mitigate CVEs (#688) (#771)
* Update commons-io-2.4.jar to 2.7 for plugins/discovery-azure-classic module
* Remove unused jackson dependency and respective LICENSE and NOTICE
* Update guava dependency to mitigate CVE for repository-azure plugin

Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-05-26 04:52:26 +05:30
Tianli Feng 69403283bd
distribution/packages: Fix RPM architecture name for 64-bit x86 (#620) (#770)
RPM uses the "x86_64" name for 64-bit x86, which is in-line with GCC
and other compilers.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>

Co-authored-by: Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
2021-05-26 04:12:38 +05:30
Rabi Panda b6ca8e6db4
[Bug] Fix gradle build on Windows failing from a recent change (#765)
A recent change as part of the commit c2e816ec introduced a bug where the build is failing on Windows. The change was made to include the NOTICE.txt file as read-only in the distributions. The code fails on Windows as it's not a POSIX-compliant. This commit adds a check on the current operating system.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-25 10:51:53 -07:00
Dhwanil Patel 9a654aa667
Add timeout on cat/stats API (#759)
Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
2021-05-24 23:18:04 +05:30
Abbas Hussain ea574d13d7
Remove URL content from Reindex error response (#630) (#748)
Signed-off-by: Sooraj Sinha <soosinha@amazon.com>

Co-authored-by: Sooraj Sinha <81695996+soosinha@users.noreply.github.com>
2021-05-21 17:20:34 -07:00
Abbas Hussain b65c70dee7
Add Remote Reindex SPI extension (#547) (#756)
This change extends the remote reindex SPI to allow adding a custom interceptor.
This interceptor can be plugged in to perform any processing on the request or response.

Signed-off-by: Sooraj Sinha <soosinha@amazon.com>

Co-authored-by: Sooraj Sinha <81695996+soosinha@users.noreply.github.com>
2021-05-22 04:50:00 +05:30
Abbas Hussain d01197f954
Catch runtime exceptions to make class loader race conditions easier to debug. (#608) (#750)
Signed-off-by: dblock <dblock@amazon.com>

Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org>
2021-05-21 11:04:14 +05:30
Abbas Hussain 935001e16a
distribution/packages: Fix filename format for deb archives (#621) (#753)
Debian packages are formatted with the following filename structure:

name_[epoch:]version-release_arch.deb

Make generated Debian packages follow this convention.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>

Co-authored-by: Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
2021-05-21 11:03:36 +05:30
Abbas Hussain ad3ece85aa
Update/maintainers.md (#723) (#752)
Adding Gopala, Vengad, Shweta, db and Itiyama to maintainers list

Signed-off-by: CEHENKLE <henkle@amazon.com>
2021-05-21 04:45:28 +05:30
Abbas Hussain 659c199b93
Updating README and CONTRIBUTING guide to get ready for beta1 release. (#672) (#751)
* Updating README and CONTRIBUTING guide to get ready for beta1 release.

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Addressing comments.

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

Co-authored-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2021-05-20 15:57:07 -07:00
Abbas Hussain 83ee60660f
Update issue template with multiple labels (#668) (#749)
Signed-off-by: Vacha Shah <vachshah@amazon.com>

Co-authored-by: Vacha Shah <vachshah@amazon.com>

Co-authored-by: Vacha <VachaShah@users.noreply.github.com>
Co-authored-by: Vacha Shah <vachshah@amazon.com>
2021-05-20 15:55:56 -07:00
Ketan Verma 25276f1848
Support Data Streams in OpenSearch (#690) (#713)
This commit adds support for data streams by adding a DataStreamFieldMapper, and making timestamp 
field name configurable. Backwards compatibility is supported.

Signed-off-by: Ketan Verma <ketan9495@gmail.com>
2021-05-20 17:14:28 -04:00
arunabh23 5a89131ded
Make default number of shards configurable (#726)
The default number of primary shards for a new index, when the number of shards are not provided in the request, can be configured for the cluster. This is a backport commit of pull #625

Signed-off-by: Arunabh Singh <arunabs@amazon.com>

Co-authored-by: Arunabh Singh <arunabs@amazon.com>
2021-05-20 17:13:46 -04:00
Rabi Panda 79c0444058
[CVE-2020-7692] Upgrade google-oauth clients for goolge cloud plugins (#662) (#734)
For discovery-gce and repository-gcs plugins update the google-oauth-client library to version 1.31.0. See CVE details at https://nvd.nist.gov/vuln/detail/CVE-2020-7692

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-20 17:13:15 -04:00
Rabi Panda 2217c11cb2
Update dependencies for ingest-attachment plugin. (#666) (#735)
This PR resolves the CVEs for dependencies in the ingest-attachment plugin.

tika : '1.24' -> '1.24.1' (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-9489)
pdfbox : '2.0.19' -> '2.0.23' (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27807)
commons-io:commons-io : '2.6' -> '2.7' (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29425)

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-20 17:13:02 -04:00
Rabi Panda 3183998b2b
[CVE-2018-11765] Upgrade hadoop dependencies for hdfs plugin (#654) (#736)
Hadoop 2.8.5 has been reported to have CVEs (https://bugzilla.redhat.com/show_bug.cgi?id=1883549). We need to upgrade this to 2.10.1. This also updates the hadoop-minicluster version to 2.10.1 as well. This upgrade also brings in two additional dependencies, woodstox-core and stax2-api that are added along with the sha1s, licenses and notices.

Also upgrade guava to the latest as per the CVE https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8908

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-20 17:12:33 -04:00
Harmish adb7b37263
[1.x] Add read_only block argument to opensearch-node unsafe-bootstrap command #599 (#725)
* apply user defined cluster wide read only block after unsafe bootstrap command

Signed-off-by: Harmish Lakhani <harmish.lakhani@gmail.com>

* Fixed gradle precommit failures

Signed-off-by: Harmish Lakhani <harmish.lakhani@gmail.com>

* remove default as false for read only block to avoid overriding user's existing settings

Signed-off-by: Harmish Lakhani <harmish.lakhani@gmail.com>
2021-05-20 17:12:16 -04:00
Abbas Hussain d330ca6559
Handle inefficiencies while fetching the delayed unassigned shards during cluster health (#588) (#730)
Signed-off-by: Meet Shah <meetshsh@gmail.com>

Co-authored-by: Meet Shah <48720201+meetshah777@users.noreply.github.com>
2021-05-20 17:11:49 -04:00
Rabi Panda 3290932fe4
[TEST] Fix failing distro tests for linux packages (#569) (#733)
Changes to fix the failing OpenSearch distribution tests for packages (linux-archive, linux-archive-aarch64, debian, rpm, docker) on supported linux distros. 

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-05-20 17:11:03 -04:00