Commit graph

10117 commits

Author SHA1 Message Date
Karen Metts
fb98ca807e
Doc: Add kafka schema registry setting to troubleshooting (#13077)
Backports #13073 to 7.x
2021-07-14 14:00:49 -04:00
Rob Bavey
3c5f7d5e9b
Backport PR #13071 to 7.x: [Test] Fix Unix acceptance tests (#13074)
Backport PR #13071 to 7.x branch. Original message:

This PR contains commits attempting to fix the broken acceptance tests:

* Fix the set of test platforms used to run unix acceptance tests

Modernizes the list of OS's used in acceptance tests, to the most modern OS's available at https://app.vagrantup.com/elastic,. This removes the centos-6 platform from the build, which is past end-of-life and fails vagrant bootstrapping, causing the build to fail.

This is more of band-aid than anything - in the longer term, we should remove these vagrant based tests completely, and rely
on the build infrastructure to perform OS-based acceptance tests.

* Fix regexes for plugin list tests. …

Fixes tests to support the plugin alias feature. This introduced a new format for
entries emitted by `bin/logstash-plugin list`:

eg
```
└── logstash-input-elastic_agent (alias)
```

This commit fixes the test to account for this change, and whitespace variances.
2021-07-14 11:36:57 -04:00
Andrea Selva
f33522f521
[backport 7.x]Move retrieval of Stack version from Gradle's configuration to execution (#13042) (#13066)
The Gradle's configuration of task should be as fast as possible and don't break the build.
This commit moves retrieval of Elastic Stack version from the remote registry to the execution phase of the tasks.
Also the tasks that depends on this has received the same change (downloadEs and check EsSHA), moving from configuration to execution phase.

Close #13030

(cherry picked from commit cef339ce57)
2021-07-13 08:53:19 +02:00
Karen Metts
09bdd51b25
Doc: Include Windows and Unix commands to run basic pipeline (#13062)
Update getting-started-with-logstash.asciidoc (#12706)
Single quotations cause errors, should be double quotes for Windows
Co-authored-by: Megan Humphreys <catonice@gmail.com>

Adds framework for showing both windows and unix examples.
Doc: Add unix command for running basic pipeline (#12714)
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-07-09 18:24:52 -04:00
Karen Metts
aa71171f7e
Release notes for 7.13.3 (#13031) (#13057)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-07-07 14:20:02 -04:00
Karol Bucek
49c04d7e5f
Docs: keep elastic_app_search output meta-data (#13048) (#13054) 2021-07-07 09:08:00 +02:00
Andrea Selva
0ac470f3cf
Fix LS benchmarking tool to work with releases >= 7.10.0 (#13052) (#13053)
Starting with version 7.10.0 the name of LS packages changed, adding os and CPU architecture in the name. This change broke the downloading of those from the benchmarking tool. This commit fixes it, composing correctly the name, based on the version it has to download.

(cherry picked from commit b722360ebd)
2021-07-06 16:31:55 +02:00
João Duarte
ed73015d9a
bump version to 7.15.0 (#13035) 2021-06-30 19:59:36 +01:00
Andrea Selva
2ce40ced1b
Emergency revert to make bump 7.15.0 (#13037)
Revert "Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (#12847) (#12868)"

This reverts commit 5287e7740e.
2021-06-30 19:24:36 +01:00
Andrea Selva
c081985782
Add unit test to grant that production aliases correspond to a published RubyGem (#12993) (#13009)
Loads the production plugin_aliases.yml definition file and check that every alias has
a properly published gem on RubyGems.

Adds clean up of plugin_aliases.yml files
Fixed task dependency for copyPluginAlias

(cherry picked from commit a5f3153a8f)
2021-06-28 16:54:08 +02:00
Karol Bucek
c30559269e
Feat: event factory support (#13017) (#13025)
Introduce a `new_event` (factory) interface for the Ruby plugin API.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

+ Refactor: keep (useful) causes mapping to Ruby errors

+ Refactor: avoid trim-ing (large) json strings

+ Feat: a synchronize(object) {} helper for Ruby

+ Feat: a (thread-safe) lazy_init_attr {} helper
2021-06-28 11:31:02 +02:00
Karen Metts
a5f3434015
Doc: Add geoip database API to node stats (#13024)
Backports #13019 to 7.x
2021-06-24 08:59:31 -04:00
kaisecheng
5616462233
Add geoip database metrics to /node/stats API (#13004) (#13020)
This PR adds geoip database status, last update timestamp, download stats counter to Node Stats API
2021-06-23 19:57:25 +02:00
Ry Biesemeyer
873e2c7396
Backport PR #12830 to 7.x: ecs-compatibility docs (#13016)
* noop: avoid declaring default value in config file

(cherry picked from commit f8fe4b6907)

* docs: ecs compatibility from 7.x perspective

Co-authored-by: Karen Metts <karen.metts@elastic.co>
(cherry picked from commit 69702ca8f8)

* ecs docs: pr feedback a11y link text

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2021-06-22 20:02:11 -07:00
Rob Bavey
6d3446d262
Backport PR #13008 to 7.x: Fix UBI source URL (#13011)
Backport PR #13008 to 7.x branch. Original message:

This commit fix the source URL for UBI image to ensure that it stays
consistent with the URL generated in
https://artifacts.elastic.co/reports/dependencies/dependencies-current.html

Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
2021-06-22 12:43:12 -04:00
Ry Biesemeyer
4dcc69d97c
ispec: fix cross-spec leak from fatal error integration specs (#13002) (#13013)
Because the "Fatal Error" specs specifically inject fatal errors during
execution, and do so by reacting to a "poison" event, the fatal error prevents
the poison event from being ACK'd in the underlying queue.

By specifying a one-off temporary data directory in these specs and cleaning up
after ourselves, we ensure that a PQ containing un-ACK'd events isn't leaked to
the next spec to run.

(cherry picked from commit 6032e5ff64)
2021-06-21 10:59:51 -07:00
Andrea Selva
2c84a5d672
Fix logstash.bat not setting exit code (#12948) (#13007)
This PR makes the Windows logstash.bat exit with the last %ERRORLEVEL% at the end, so that any error in running Logstash will get propagated back to the command line.

Before this change, logstash.bat would always exit with code 0 - success (when doing cmd.exe /C logstash.bat), even if the java.exe process exited with a non-zero code (e.g. due to Logstash throwing an error at runtime).

(cherry picked from commit 1f9ef97836)

Co-authored-by: Dion Williams <dionrhys1@gmail.com>
2021-06-21 14:37:31 +02:00
Andrea Selva
75d616eba7
Use the OS separator to invoke gradlew from Rake script (#13000) (#13006)
Uses the OS defined path separator in Rake script to invoke the gradlew command. Without this the sh('./gradlew assemble') results in error when running .\gradlew clean installDefaultGems.

(cherry picked from commit d2c68fc0f9)
2021-06-21 12:06:38 +02:00
Andrea Selva
1059bd91f3
Fix Reflections stack traces when process yml files in classpath and debug is enabled (#12991) (#13003)
Adds a filter to Reflections library initialization so that when it scan "org.logstash.plugins" it includes only .class files and avoid to load and process AliasRegistry.yml and plugin_aliases.yml

Fixes #12992

(cherry picked from commit a6e9a6bcfd)
2021-06-18 14:25:30 +02:00
Andrea Selva
db726ab6f0
Fix/log4j routing to avoid create spurious file (#12965) (#12999)
Avoid the creation of log4j routing appender for log events without the `pipeline.id` fishtag.
In this way no spurious log file named "pipeline_${ctx:pipeline.id}.log" and logs are not duplicated with main Logstash log file.

(cherry picked from commit 1d6a3e4bb3)
2021-06-18 08:31:49 +02:00
Andrea Selva
f063d86c31
Added test to cover the installation of aliased plugins (#12967) (#12998)
Added test to cover the installation of aliased plugins when exists a gem with same name but that's not a Logstash plugin.
In this case the alias is resolved to the original, skipping the gem retrieved from RubyGems.

(cherry picked from commit cafbf03158)
2021-06-17 17:01:14 +02:00
Andrea Selva
138b60c839
Explicitate the type of log format in appender's names (#12964) (#12997)
Remove an useful dynamic creation of appender's log file which leverages the `log.format` property
also when it's explicit by the appender itself.

Log4j configuration leverages the placeholder `${sys:ls.log.format}` to compose the name of the log file.
This generates some not evident conflicts in log4j internals, these conflicts became evident when enabling the `pipeline.separate_logs` feature is enabled and the log4j appender definitions contains both json and plain format.
The problem is that under those circumstances the rollover of the log file doesn't happen.

This commit also add a test against the production log4j configuration, to avoid future regressions.

(cherry picked from commit a0774c4e76)
2021-06-17 14:21:24 +02:00
Andrea Selva
adcb0da91e
Fix acceptance test when run artifact:all (#12975) (#12996)
This commit avoid to check for existence of jar files to decide if run or not Gradle assemble,
basically because the outputs of assemble task are not only jars but also others files, for example plugin-aliases.yml.
In this way the decision to execute or not is left the Gradle logic.

(cherry picked from commit 3eaff3612d)
2021-06-17 11:50:38 +02:00
kaisecheng
72e8dc8d9c
fix database manager with multiple pipelines (#12862) (#12995)
This PR adds support to geoip multiple pipelines which have a single instance
to manage database download to avoid individual download per pipeline
2021-06-17 10:44:18 +02:00
Andrea Selva
854fad6339
Avoid hard-coded plugin alias definitions (#12841) (#12960)
Remove hard coded alias definitions in favor of yaml descriptor file.

Introduce a single point of aliases definition (logstash-core/src/main/resources/org/logstash/plugins/AliasRegistry.yml),  checksum and copy it around to be used by Logstash and by Logstash's plugin management tool.

The descriptor yml file contains a checksum to verify it's not changed accidentally in a deployment of Logstash, if the verification phase fail Logstash avoid to start and plugin management tool avoid to operate.
The signing and copying around is managed by a specific Gradle task invoked during the build.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

Fixes #12831

(cherry picked from commit 446dc7d906)
2021-06-16 17:34:46 +02:00
Karol Bucek
35ce0eed13
[7.x] Deps: update JRuby to 9.2.19.0 (#12989) (#12990) 2021-06-16 12:04:05 +02:00
Karen Metts
7d4b2ff313
Doc: Add tip for checking for existing field (#12987)
Backports #12899

Co-authored-by: Sebastian <gentunian@users.noreply.github.com>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
2021-06-15 14:13:50 -04:00
Karen Metts
d0d4cae733
Release notes draft for 7.13.2 to 7.x (#12982)
Forwardports #12981 to 7.x

Co-authored-by: Logstash Machine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-centos-7-1623415853715328646.c.elastic-ci-prod.internal>
2021-06-14 16:35:37 -04:00
Karen Metts
9997cee388
Doc: Remove unused tagged regions (#12979)
Backports #12976 to 7.x
2021-06-10 15:38:08 -04:00
Karol Bucek
419b1dc988
Backport PR #12791 to 7.x: Deps: update JRuby to 9.2.18.0 (#12971)
Backport PR #12791 to 7.x branch. Original message:

Version bump of JRuby.

+ Fix: a missing require in bootstrap

(cherry picked from commit ee6038afec)
2021-06-10 07:24:17 +02:00
Karol Bucek
9cf722d30b
Test: handle a RGs warning from packing output (#12974)
in preparation for JRuby 9.2.18.0 which includes a RGs update
2021-06-10 06:41:01 +02:00
Andrea Selva
adb7f678ef
Backport PR #12962 Fix dependency on plugin_alias.yml during rake artifacts:all (#12963)
The module LogStash::PluginManager requires the file `lib/pluginmanager/plugin_aliases.yml` is created,
which happend during the Gradle's 'copyPluginAlias' executed as part of Rake's 'bootstrap'.

(cherry picked from commit 8e62e8a01c)
2021-06-04 14:45:21 +02:00
Andrea Selva
d9e21549c2
Refactoring of JavaKeyStore.getKeyStorePassword method to simplify if conditions (#12952) (#12961)
Streamline the flow of logic avoiding nesting of if-s to make evident the good path vs the error conditions.

(cherry picked from commit aa8305f1d4)
2021-06-03 14:07:34 +02:00
kaisecheng
6766a87825
Release notes for 7.13.1 (#12946) (#12957)
* Update release notes for 7.13.1

Co-authored-by: Karen Metts <karen.metts@elastic.co>
2021-06-03 10:42:50 +02:00
Andrea Selva
f93b30cca4
Use the JVM specified in the CI matrix environment also to run spawned proccesses (#12945) (#12953)
logstash-keystore integration tests spawn a Java process, which by default uses the system JDK generally exposed with JAVA_HOME environment variable. It could be that this JDK is not the one selected with the build system variable BUILD_JAVA_HOME.
This commit uses the JDK defined in BUILD_JAVA_HOME if present.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit fa9adb4b86)
2021-06-01 14:21:13 +02:00
Karen Metts
0a1bb2fd0b
Internal: Update messaging in release notes script (#12949) (#12950) 2021-05-28 11:32:26 -04:00
Rob Bavey
f0ba6ea5c3
Backport PR #12925 to 7.x: Add logstash-integration-elastic_enterprise_search to plugins-metadata.json (#12934)
Backport PR #12925 to 7.x. Original Message:

* Add logstash-integration-elastic_enterprise_search to plugins-metadata.json
* Remove old elastic_app_search plugin and set integration as default
* Add license information for workplace search gem

(cherry picked from commit a935261eeb)
2021-05-27 09:40:19 -04:00
Karen Metts
5ff415c492
Doc: Expand definition and fix typo(#12937)
Backports #12936 to 7.x
2021-05-26 15:18:06 -04:00
Karen Metts
270616f34a
Forwardport release notes for 7.13.0 to 7.x branch (#12932)
Forwardports #12842

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-05-26 10:14:09 -04:00
kaisecheng
ec8d182ebb
Geoip disable database manager (#12905) (#12906) 2021-05-14 10:39:37 +02:00
Andrea Selva
f8551a05cf
Update bundled JDK to 11.0.11+9 (#12881) (#12882)
(cherry picked from commit 4f63701d6d)
2021-05-13 11:52:48 +02:00
João Duarte
7f934db2ca
fix ubi8 docker image creation by skipping yum clean metadata (#12902) (#12903)
ubi8 image uses microdnf as a package manager, and microdnf does
not support the "yum clean metadata" command. This commit adds
the logic to skip this command if the image_flavor is ubi8

(cherry picked from commit d1b12ded1d)
2021-05-12 15:10:49 +01:00
Rob Bavey
e5e41f85c4
[backport 7.x] [Build] On aarch64 docker build, install noarch version of bind-license first (#12891) (#12900)
Backport PR #12891 to 7.x branch. Original message:

On aarch64, yum does not pick the correct 'bind-license' package,
this commit installs a specific noarch RPM

This commit also adds retry to the yum installs and updates.
2021-05-12 10:12:56 +01:00
Karen Metts
4f58cb3bf5
Doc: Update contributing steps and guidelines (#12895)
Backports #12879 to 7.x
2021-05-11 15:01:52 -04:00
Karen Metts
3b552afebe
Comment out config examples that no longer work (#12892)
Backports #10671
Co-authored-by: dedemorton <dede.morton@elastic.co>
2021-05-11 14:10:57 -04:00
kaisecheng
6a338c675c
Geoip use cc indefinitely (#12888) (#12889)
This PR allows using CC database indefinitely if Logstash hasn't used EULA database ever
Fixed: #12859
2021-05-11 18:08:11 +02:00
kaisecheng
68b8fd3a48
change download path for geoip plugin (#12863) (#12875)
The database was downloaded in plugin/vendor
This PR changes the working directory to `path.data`
2021-05-10 14:28:44 +02:00
Andrea Selva
b33692e417
Update elasticsearch gem dependency requirements (#11258) (#12874)
Update Elasticsearch minimum version requirement to ~>7 also on the 7.x branch.
Relates to #11258

(cherry picked from commit ef9b0d2db5)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2021-05-06 16:22:00 +02:00
Andrea Selva
5287e7740e
Change Gradle's :logstash-integration-tests:integrationTests task to depends on copyES (#12847) (#12868)
The integrationTests start instances of Elasticsearch so they need it to be present and unpacked in build/ folder before start.

(cherry picked from commit 149ee41a8b)
2021-05-03 12:43:09 +02:00
Karen Metts
6c0f3c6020
Doc: Keystore must be accessible to logstash user (#12864)
Backports  #12775
Updates docs to propagate change to other branches. The original was a direct commit to the 7.10 branch.
2021-04-30 18:04:39 -04:00