Commit Graph

1028 Commits

Author SHA1 Message Date
Lukáš Vlček 270c59f523
Fix AssertionError message (#2044)
Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
2022-02-02 16:58:25 -06:00
Andriy Redko c8ac037389
[FEATURE] Add OPENSEARCH_JAVA_HOME env to override JAVA_HOME (#2001)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-02-02 13:55:22 -05:00
Andriy Redko 6c2f01a045
[BUG] Docker distribution builds are failing. Switching to http://vault.centos.org (#2024)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2022-02-01 12:42:48 -06:00
Rishikesh Pasham 1568407c36
Upgrading Jackson-Databind version (#1982)
* Upgrading Jackson-Databind version

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Adding jackson-databind version using getProperty method

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
2022-01-26 20:44:22 -08:00
sharp-pixel 1bb8864178
Add darwin-arm64-tar and no-jdk-darwin-arm64-tar archive distributions. (#1668)
* Add darwin-arm64-tar and no-jdk-darwin-arm64-tar archive distributions.

Signed-off-by: Cédric Pelvet <cedric.pelvet@gmail.com>

* Fix dangling HTML tags in javadoc to solve build issues with JDK 17.

Signed-off-by: Cédric Pelvet <cedric.pelvet@gmail.com>
2022-01-06 12:39:13 -05:00
Tianli Feng db23f72a2a
Update FIPS API libraries of Bouncy Castle (#1853)
* Update bc-fips to 1.0.2.1

Signed-off-by: Tianli Feng <ftl94@live.com>

* Update bcpg-fips to 1.0.5.1

Signed-off-by: Tianli Feng <ftl94@live.com>

* Update bctls-fips to 1.0.12.2

Signed-off-by: Tianli Feng <ftl94@live.com>

* Use the unified bouncycastle version for bcpkix-jdk15on in HDFS testing fixture

Signed-off-by: Tianli Feng <ftl94@live.com>
2022-01-05 16:59:55 -08:00
Andriy Redko 546eacc3dd
Gradle clean failing after a failed gradle check, folders created by Docker under 'root' user (#1726)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-12-18 10:57:04 -05:00
Andriy Redko 069e229b29
Support JDK 18 EA builds (#1710)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-12-13 12:42:25 -05:00
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 bcfb57c06a
Upgrade dependency (#1571)
* Upgrading guava, commons-io and apache-ant dependencies

Signed-off-by: Vacha <vachshah@amazon.com>

* Adding failureaccess since guava needs it

Signed-off-by: Vacha <vachshah@amazon.com>
2021-11-18 13:38:49 -05:00
Andrew Ross 546ab21989
Use a non-default port for upgrade-cli unit tests (#1512)
I observed a [test failure][1] that I believe was caused by the fact
that an OpenSearch server happened to be running at localhost:9200 when
these unit tests were executed. The code under test has logic to try to
connect to localhost:9200 and then fall back to defaults if that port is
not open. The tests expect these defaults and will fail if different
data is returned. The change here is to use a non-default port to make
it very unlikely that a real instance will be running at the non-default
port. I don't know why an OpenSearch service happened to be running
during the linked test failure, but I think making these unit tests more
independent and isolated is helpful no matter the underlying cause in
this case.

[1]: https://fork-jenkins.searchservices.aws.dev/job/OpenSearch_CI/job/PR_Checks/job/Gradle_Check/975/artifact/gradle_check_975.log/*view*/

Signed-off-by: Andrew Ross <andrross@amazon.com>
2021-11-05 09:52:16 -04:00
Andriy Redko f469d53cff
[BUG] SymbolicLinkPreservingUntarTransform fails on Windows (#1433)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-26 09:45:26 -05:00
Romain Tartière ea0fe7bfae
Allow building on FreeBSD (#1091)
* Allow building on FreeBSD

With this set of change, we are able to successfuly run:

```
./gradlew publishToMavenLocal -Dbuild.snapshot=false
```

This step is used in the OpenSearch repository context when building
plugins in the current state of the CI.

While here, reorder OS conditions alphabetically.

Before building, the openjdk14 package was installed and the environment
was adjusted to use it:

```
sudo pkg install openjdk14
export JAVA_HOME=/usr/local/openjdk14/
export PATH=$JAVA_HOME/bin:$PATH
```

Signed-off-by: Romain Tartière <romain@blogreen.org>

* Unbreak CI with FreeBSD support

Signed-off-by: dblock <dblock@dblock.org>

Co-authored-by: dblock <dblock@dblock.org>
2021-10-14 14:42:28 -04:00
Andriy Redko 3779576c51
Modernize and consolidate JDKs usage across all stages of the build. Use JDK-17 as bundled JDK distribution to run tests (#1358)
* Modernize and consolidate JDKs usage across all stages of the build. Use JDK-17 as bundled JDK distribution to run tests

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

* Using -Djava.security.egd=file:/dev/urandom explicitly for cli tests

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-13 17:25:48 -04:00
Andriy Redko e9635d6bfe
Replace securemock with mock-maker (test support), update Mockito to 3.12.4 (#1332)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-10-10 14:18:54 -04:00
Xue Zhou 0ab8e34022
Rename artifact produced by the build to include -min (#1251)
Signed-off-by: Xue Zhou <xuezhou@amazon.com>
2021-09-21 19:43:35 -04:00
Andriy Redko cdbc84f09d
Update Jackson to 2.12.5 (#1247)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
2021-09-21 18:33:20 -04:00
Nick Knize aecc7bd005
[Bug] Fix InstallPluginCommand to use proper key signatures (#1233)
The public key has changed since the initial release. This commit fixes the
public key and uses the .sig files that are published to the artifacts site.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-09-10 14:58:31 -07:00
Sven R 268d93b375
FreeBSD Java support (#1014)
Signed-off-by: hackacad <admin@hackacad.net>
2021-09-07 18:17:58 -04:00
Minal Shah a43e6cf424
Fixed copyright to OpenSearch (#1175) 2021-08-31 12:55:28 -04:00
Nick Knize ff7e7904ca
[DEPRECATE] SimpleFS in favor of NIOFS (#1073)
Lucene 9 removes support for SimpleFS File System format. This commit deprecates
the SimpleFS format in favor of NIOFS.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-08-19 17:56:55 -05:00
Sven R dcd9cef56c
alt bash path support (#1047)
Signed-off-by: hackacad <admin@hackacad.net>
2021-08-06 11:09:29 -04:00
Sven R 0fd14e8c3c
alt bash path support (#1013)
Signed-off-by: hackacad <admin@hackacad.net>
2021-08-03 09:10:30 -04:00
Vacha 25f0b1e6bd
Validation for official plugins for upgrade tool (#973)
Add validation to check for official plugins during the plugins installation task for the upgrade tool.

Signed-off-by: Vacha Shah <vachshah@amazon.com>
2021-07-27 09:01:10 -07:00
Vacha 19e54d6624
Allowing custom folder name for plugin installation (#848)
Signed-off-by: Vacha Shah <vachshah@amazon.com>
2021-07-22 04:28:49 +05:30
Poojita Raj 6bc4ce017a
Replace Elasticsearch docs links in scripts (#994)
Replace the docs links In scripts bin/opensearch-env and config/jvm.options, with OpenSearch docs links.

Signed-off-by: Poojita-Raj <poojiraj@amazon.com>
2021-07-21 14:23:22 -07:00
xuezhou25 e3d86baa5a
Fix opensearch-env always sources the environment from hardcoded file (#875)
distribution/bin/opensearch-env always sources the environment from the default environment file /etc/default/opensearch. This is an issue if we want to run multiple instances of OpenSearch on the same host. This change lets users override the default behavior by not sourcing the default environment file in case OPENSEARCH_PATH_CONF  is set.

Signed-off-by: Xue Zhou <xuezhou@amazon.com>
2021-07-21 07:51:26 -07:00
Himanshu Setia 13a02becba
Restricting logs permissions (#966)
Currently, the permissions for opensearch logs are -rw-r-r-, which gives read access to anyone. This weak permission
structure can lead to leakage of any sensitive information (if published) in the logs. This commit restricts read
access with -rw-r--- permission.

Signed-off-by: Himanshu Setia <setiah@amazon.com>
2021-07-15 10:06:45 -07:00
Rabi Panda 4906a3c1b0
A CLI tool to assist during an upgrade to OpenSearch. (#846)
This change adds the initial version of a new CLI tool `opensearch-upgrade` as part of the OpenSearch distribution. This tool is meant for assisting during an upgrade from an existing Elasticsearch v7.10.2/v6.8.0 node to OpenSearch. It automates the process of importing existing configurations and installing of core plugins.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-07-13 09:51:02 -07:00
Daniel Doubrovkine (dB.) 5d020170ff
Lower build requirement from Java 14+ to Java 11+ (#940)
* Lower build requirement from Java 14+ to Java 11+

Avoid use of -Werror -Xlint:all, which may change significantly across
java releases (new warnings could be added). Instead, just list the
warnings individually.

Workaround JDK 11 compiler bug (JDK-8209058) that only impacts test fixture
code in the build itself.

Signed-off-by: Robert Muir <rmuir@apache.org>

* Disable warning around -source 7 -release 7 for java version checker

The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <rmuir@apache.org>

* more java14 -> java11 cleanup

Signed-off-by: Robert Muir <rmuir@apache.org>

Co-authored-by: Robert Muir <rmuir@apache.org>
2021-07-06 11:55:23 -05:00
Ralph Ursprung 0079fde645
docker build: use OSS `log4j2.properties` (#878)
with Elasticsearch there were two flavours of the docker build: one for
the OSS build and one with X-Pack. accordingly, there were two
`log4j2.properties` files for the two cases and the `build.gradle`
picked up the correct one depending on the build.

commit 83e87f7e54 removed all non-OSS functionality from the build but
with that it also removed the logic which so far copied over the OSS
version of `log4j2.properties`.

what the diff doesn't show properly here is that `log4j2.properties` has
been deleted and `oss/log4j2.properties` has been moved into its place
without any changes to it.

this fixes #868

Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
2021-06-24 10:16:17 -07:00
Rabi Panda ca564fd04f
Enable adding experimental features through sandbox modules (#691)
OpenSearch uses plugins to add new features. A plugin can be included in the distribution by default (as part of *modules* directory) or can be installed optionally from a plugin repository.

This change provides a separate space called *sandbox* inside OpenSearch for the community to easily experiment new ideas and innovate. Ideally, this is where an experimental feature will reside before it can be promoted to the *modules* directory. All the plugins in this module will only be included in the **snapshot distributions**. During assembling distributions, we will check if the following two conditions are met to include the sandbox modules,

* the distribution is a snapshot i.e. the build system property `build.snapshot` is set to true. We use this because it will prevent accidental bundling of these modules in a release distribution.
* the `enable.sandbox` system property is set to true. By default it is set to true. The purpose of adding this extra flag is that we can exclude the modules from snapshots if needed. For example, we may want to run performance tests on snapshots without the sandbox modules.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-06-22 11:45:18 -05:00
Neal Gompa (ニール・ゴンパ) 381b76eaa9
distribution/packages: Fix RPM architecture name for 64-bit x86 (#620)
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>
2021-05-26 02:41:11 +05:30
Himanshu Setia 6f893ed1cd
Merging javadoc feature branch changes to main (#715)
* Adds a gradle plugin to validate missing javadocs

Use `./gradlew missingJavadoc` to validate missing javadocs.
Currently this task fails because several modules are missing
appropriate javadocs. Once added, this should pass.
Also, precommit PomValidation check currently fails with missing Javadoc
plugin, that needs to be fixed -
https://github.com/opensearch-project/OpenSearch/issues/449
Thus keeping this in a separate feature branch.

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Fix Javadoc errors in module `client/rest` (#685)

* Fix Javadoc errors in client/rest module

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Add package info file in client/rest module

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Fix typos

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Add exception documentation to Javadoc

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>

* Fixes precommit task configuration failures due to newly added missin… (#707)

* Fixes precommit task configuration failures due to newly added missingJavadoc task

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Fixes javadoc task errors due to PR#685

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Updated CONTRIBUTING.md for info on javadocs

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Correcting licenses and naming

Signed-off-by: Himanshu Setia <setiah@amazon.com>

* Correcting version info

Signed-off-by: Himanshu Setia <setiah@amazon.com>

Co-authored-by: Gregor Zurowski <gregor@zurowski.org>
2021-05-18 13:21:41 -07:00
Rabi Panda c2e816ecf6
[TEST] Fix failing distro tests for linux packages (#569)
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-15 21:45:48 -07:00
Neal Gompa (ニール・ゴンパ) 4d88210c12
distribution/packages: Fix filename format for deb archives (#621)
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>
2021-05-13 15:14:02 -07:00
Abbas Hussain eacd7324d0
Replace elastic.co with opensearch.org (#611)
Signed-off-by: Abbas Hussain <abbas_10690@yahoo.com>
2021-04-27 21:45:12 -05:00
Sarat Vemulapalli 0e9f74e35f
Renaming CPU architecture to have consistent naming (#612)
* Renaming CPU architecture from x86_64, aarch64 to x64, arm64

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
2021-04-26 09:40:09 -07:00
Tom "spot" Callaway b8f9469cc9
clean up rpm artifact naming (#590)
Signed-off-by: Tom spot Callaway <spotaws@amazon.com>
2021-04-21 11:45:53 -07:00
Rabi Panda 163a51fc5a
Remove the oss string from OpenSearch distributions (#575)
This commit removes the 'oss' string which was a remnant of the predecessor distribution flavors. As OpenSearch has no flavors for distributions, we are removing this tag from all the distribution names.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-20 09:27:40 -07:00
Nick Knize 0ba0e7cc26
[Versioning] Rebase to OpenSearch version 1.0.0 (#555)
This commit rebases the versioning to OpenSearch 1.0.0

Co-authored-by: Rabi Panda <adnapibar@gmail.com>

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-15 17:06:47 -05:00
Rabi Panda 0a66f9ace1
[TEST] Fix failing packaging tests for OpenSearch distributions. (#541)
While creating the archives and packages, the build tries to copy the non-existent file `README.asciidoc` instead of `README.md`. Consequently, the packaging tests fail during verification time. This commit addresses the issue by fixing the name.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-14 07:02:25 -07:00
Nick Knize ee6d15e26a
[License] Add SPDX License Header to security policies (#531)
This commit adds the SPDX license header and modifications copyright to security
policy files.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-12 22:59:36 -05:00
Nick Knize 05a6fde676
Update Plugin Signing Key (#512)
This commit updates the public_key.asc for verifying the signature of plugins in
the InstallPluginCommand utility. The key details are as follows:

e-mail: opensearch-infra@amazon.com
key id: 0934A65836A51424

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
2021-04-09 15:14:33 -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
Rabi Panda 7949f92bec
Cleanup `default` flavor stragglers from docker distributions. (#481)
This commit removes the references for the `default` docker distributions which were originally part of the different flavors of distributions. This also fixes some of the failing docker compose tests under `qa`.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-09 10:24:41 -07:00
Rabi Panda cea21610bb
Use OpenSearch artifacts URL for official plugin installation. (#490)
Replace the Elastic artifacts URLs with the OpenSearch artifacts URLs.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-08 13:05:26 -07:00
Rabi Panda 2dca3462f2
Fix stragglers from renaming to OpenSearch work. (#483)
This commit fixes more instances where we missed renaming to OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-04-05 11:51:20 -07:00
Rabi Panda ffc561d7ef
Mute the keystore-cli failing tests. (#469)
The opensearch-keystore tool is currently failing to load and update older versions keystores created using the elasticsearch-keystore tool. This results in couple of failing tests for bwc and upgrade of the older versions of keystore files.

This commit mutes these two tests until we make a decision on the minimum supported version.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-27 13:46:19 -07:00
Rabi Panda 3460a8c213
Fix a few more renaming issues. (#464)
This commit fixes some more missed instances where we can perform the renaming to OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
2021-03-26 12:05:16 -07:00