Commit graph

10117 commits

Author SHA1 Message Date
github-actions[bot]
2c253c563e
Backport PR #13689 to 7.17: Update failing policy in Central Management fetcher and license checker if hit ES down node (#13925)
* Update failing policy in Central Management fetcher and license checker if hit ES down node (#13689)

Wraps the calls to the central management Elasticsearch cluster with the utility class Stud::Try to handle the remote host error when the client used to connect hit a not available node.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit c544ecb380)

* Covered all calls to ES with retryable

* Mocked logger interaction in test after wrapping the client calls with retryable

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-04-12 11:19:51 +01:00
João Duarte
475c7c8940
Bump Logstash version to 7.17.3 (#13965) 2022-03-31 18:11:55 +01:00
Logstash Machine
43b1261cf0
Release notes for 7.17.2 (#13932)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-opensuse-15-1-1648138023535464121.c.elastic-ci-prod.internal>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-03-30 20:57:29 +01:00
github-actions[bot]
7474ce9275
[DOC] precedence between environment variables and yml in docker (#12198) (#13949)
Backport PR #12198 to 7.17 branch

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
(cherry picked from commit 682f07b703)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-03-29 17:38:06 +01:00
github-actions[bot]
8c8eac0e45
bump lock file for 7.17 (#13927)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2022-03-24 16:06:14 +00:00
github-actions[bot]
86ed160086
add backoff to checkpoint write (#13902) (#13931)
This commit changes `queue.checkpoint.retry` to `true` by default allowing retry of checkpoint write failure.
Add exponential backoff retry to checkpoint write to mitigate AccessDeniedExcpetion in Windows.
Fixed: #12345

(cherry picked from commit 1a5030bd63)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-03-24 15:39:22 +00:00
github-actions[bot]
7df02cc828
Update Jackson databind in ingest-converter tool (#13900) (#13917)
Backport PR #13900 to 7.17 branch

(cherry picked from commit 32675c1a88)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2022-03-18 13:10:05 +00:00
João Duarte
898da5f41b fix default argument handling in rake artifact task (#13904)
Ruby allows methods to have default values in arguments if they're not
passed. However if a nil is passed then the default value isn't used.

The artifact:archives tasks were passing nil values to the exclusion
argument, causing all files to be included in the package.

This commit cleans the naming of the path lists and ensures the default
exclusion list is always used.
2022-03-18 11:47:33 +00:00
github-actions[bot]
59a30d8b39
[Doc] update queue.max_bytes and queue.page_capacity (#13833) (#13910)
Fixed: #8650, #10718

Backport PR #13833 to 7.17 branch

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit d71553e5d7)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2022-03-18 11:05:27 +00:00
Karol Bucek
3300df77b0
Deps: unpin jruby-openssl in logstash-core (#13903) 2022-03-17 18:00:14 +01:00
Andrea Selva
67dea141ca
Quotes java executable path in case it contains spaces (#13881) (#13893)
Updates all Windows batch scripts used as CLI tools to quotes the %JAVACMD% to avoid path problems when the path contains spaces.

(cherry picked from commit a8bd90c22d)
2022-03-14 19:04:53 +01:00
João Duarte
e06efed623
bump jdk to 11.0.14.1+1 (#13687) (#13870)
(cherry picked from commit eec3f22bb2)
2022-03-08 14:52:09 +00:00
Ry Biesemeyer
011cc5ba7a
i18n: alias logstash.runner.configuration.* under logstash.agent.configuration (#13244) (#13843)
A number of plugins reach into Logstash's i18n translations to "helpfully"
communicate certain configuration errors, but rely on translations that were
moved in 00a99c19e5 from logstash.agent to
logstash.runner. Since then, it is possible to hit obtuse error messages about
failing to load a translation instead of the intended helpful message:

~~~
translation missing: en.logstash.agent.configuration.invalid_plugin_register
~~~

By moving the `logstash.agent` definition to _after_ the `logstash.runner`
definition, we can use YAML tooling to name the `logstash.runner.configuration`
node and then merge its contents into `logstash.agent.configuration`. This
effectively allows us to keep a single definition of those translations while
making them available at both addresses.

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
(cherry picked from commit 8bec0e658a)
2022-03-07 11:05:20 -08:00
Ry Biesemeyer
a491462e69
api: avoid 5xx when stats/events not yet populated (#13424) (#13845)
* api: avoid 5xx when stats/events not yet populated

* Add catching of metrics exception also for retrieve of :queue metrics. No pipelines means no queues created

* Added empty result when no pipelines is present and query for node info API

Co-authored-by: andsel <selva.andre@gmail.com>
(cherry picked from commit a6c0e75b53)
2022-03-07 11:04:18 -08:00
Ry Biesemeyer
5d0ad6ea38
pipeline-info: increase safety of transforming stats (#13345) (#13850)
When a pipeline isn't fully initialized, we run the risk of attempting to
format pipeline info that isn't yet fully-shaped. By using safe-fallback
methods like `Hash#dig` and conditional-chaining, we can avoid the spurious
`NoMethodError` caused by sending `[]` to nil.

(cherry picked from commit e9455ca81e)
2022-03-07 11:02:18 -08:00
João Duarte
f0fa13d188
speed up artifact file listing (#13862) (#13865)
currently the artifact tasks compute the file listing from a list of
include regexes and exclude regexes. However this is done by hand,
taking each include regex and running it through each exclude regex.

This is quite slow as we add more exclude regexes. This PR changes to
totally relying on Rake::FileList, by feeding it the include and exclude
lists. This speeds up file listing from 150 seconds to 1 second.

(cherry picked from commit edfbabf2fc)
2022-03-07 18:58:40 +00:00
Andrea Selva
a7893d8bb6
[Backport 7.17]Fix Logstash cli tools to use the selected JDK under Windows (#13839) (#13863)
* Fix Logstash cli tools to use the selected JDK under Windows (#13839)

Some Logstash tools invokes directly the JRuby intepreter. The interpreter uses the JVM pointed by two environment variables:
- JAVACMD
- JAVA_HOME\bin\java.exe

The setup.bat script exported the selected JVM under the env var named JAVA, which isn't recognized by vendored jruby.
This commit fixes it renaming to JAVACMD.

(cherry picked from commit 0084492494)

* Fixed the case for JAVA_HOME selection path
2022-03-07 17:22:10 +01:00
Ry Biesemeyer
6fe6bc1054
Backport PR #13715 to 7.17: artifacts: omit openssl_pkcs8_pure specs from built artifacts (#13852)
* artifacts: omit openssl_pkcs8_pure specs from built artifacts (#13715)

* artifacts: omit openssl_pkcs8_pure specs from built artifacts

* Exclude _all_ top-level spec and test directories from built artifacts

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 0369ba208d)

* Update releasenotes.asciidoc (#13701)

Fixed OS name. Ubuntu instead of Ununtu.

Co-authored-by: Cris da Rocha <cdarocha.astro@gmail.com>
2022-03-04 17:33:49 -08:00
Ry Biesemeyer
fb68365e45
geoip-db: support http_proxy environment variable (#13410) (#13841)
(cherry picked from commit 022072c437)
2022-03-04 11:00:36 -08:00
Karol Bucek
4f6419fd1c
Build: avoid doing a redundant bundle install (#13820) (#13824)
(cherry picked from commit c3d2f5750f)
2022-03-01 17:41:20 +01:00
Karol Bucek
6f447440fe
Feat: conservative plugin (dependency) updates by default (#13794) (#13804)
(cherry picked from commit 67fd99b5b6)
2022-02-28 22:34:02 +00:00
kaisecheng
f46c9faa21
bump core version to 7.17.2 (#13817) 2022-02-28 14:15:36 +00:00
Logstash Machine
60688f2377
Release notes draft for 7.17.1 (#13813)
* Update release notes for 7.17.1

* copy from 8.0.1 release note

Co-authored-by: Jenkins CI <jenkins@logstash-ci-immutable-ubuntu-1804-lts-1645618372441025592.c.elastic-ci-prod.internal>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
2022-02-24 10:21:39 +00:00
kaisecheng
c5dcd54426
Bump Gemfile lock for 7.17.1 (#13805) 2022-02-22 09:52:20 +00:00
kaisecheng
f47db585ec
pin jruby-openssl in logstash 7.17.1 as a recent update causes a gem load error #13785 (#13806) 2022-02-21 15:44:47 +00:00
Karol Bucek
f80999c6b2
Deps: pin sinatra due (2.2.0) incompatibilities (#13784) (#13788)
Backport PR #13784 to 7.17
2022-02-16 16:37:38 +01:00
Karen Metts
45c8442f59
Doc:Update qa readme with BUILD_JAVA_HOME setting info [7.17] (#13780)
Backports #11985 to 7.17
Co-authored-by: Rob Bavey rob.bavey@elastic.co
2022-02-15 20:25:42 -05:00
kaisecheng
cddcf18ca3
fix pqrepair log4j setting (#13726) (#13768)
added logger for pqrepair to print log in console
Fixed: #13725
2022-02-15 16:03:16 +00:00
kaisecheng
5197b340aa
Unpin bundler, fix gem installer tests (#13762) (#13776)
Fix gem installer tests to enable unpinning the version of bundler

This commit removes changes the gem installer to use real gems, rather than
use `allow_instance_of` during testing, which appears to be problematic with the
latest version of bundler
# Conflicts:
#	build.gradle

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-02-15 15:52:09 +00:00
kaisecheng
205faa6b64
[7.17] handle fully acked 0 byte PQ pages (#13692) (#13761)
This commit deleted the corrupted zero byte PQ file and recreated the head checkpoint file to get rid of page file size is too small exception

Fixed: #10855
2022-02-15 14:38:45 +00:00
Andrea Selva
0db25a80b5
[backport 7.17]Publish CPU percentage also non Unix systems (#13727) (#13732)
Clean backport of #13727 to branch `7.17.`

----
Original comment:

Use same technique for Unix system to extract the CPU percentage and publish to Logstash's metrics collector.
It doesn't retrieve the full set of metric of a Unix system, but the ones that are available from internal JDK class com.sun.management.OperatingSystemMXBean

(cherry picked from commit d8f4784d69)
2022-02-08 18:14:22 +01:00
kaisecheng
5fca46e638
pqcheck pqrepair handle .tmp checkpoint (#13721) (#13731)
* pqcheck skip checking checkpoint.*.tmp
* pqrepair delete checkpoint.*.tmp

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2022-02-08 12:24:24 +00:00
Cris da Rocha
2c515750fd
Update releasenotes.asciidoc (#13701)
Fixed OS name. Ubuntu instead of Ununtu.
2022-02-02 10:28:50 -05:00
Andrea Selva
380089cdec
Bump for next 7.17.1 (#13695) 2022-02-01 16:17:49 +01:00
Logstash Machine
4113c6b424
Release notes draft for 7.17.0 (#13690)
* Update release notes for 7.17.0

* humanize the generated release notes for 7.17.0

* release-notes: improve tense continuity and wording

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

Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2022-01-31 10:46:57 -08:00
Karen Metts
455995c32a
Doc: Add placeholder for 7.17.0 release notes (#13688) 2022-01-27 13:16:35 -05:00
kaisecheng
4cfe698391
Revert "[DOC] Clarify the scope of environment variable expansion (#13299)" (#13679) (#13683)
This reverts commit 096eb7ac48.
2022-01-27 10:24:32 +00:00
Ry Biesemeyer
e971d17ddb
Update patch plugin versions in gemfile lock (#13680) 2022-01-26 09:14:30 +01:00
kaisecheng
d2a98a0b77
Support env variable in condition (#13608) (#13678)
This PR substitutes ${VAR} in Expression, except RegexValueExpression, with the value in secret store, env.
The substitution happens after syntax parsing and before graph execution.

Fixed: #5115
2022-01-25 16:22:37 -08:00
Ry Biesemeyer
bdf2748e16
bump dependency patches again for in-flight 7.17.0 (#13676) 2022-01-25 12:20:02 -08:00
Andrea Selva
289ea89b2d
[Backport 7.17] Test fix, switch to plugin with less dependencies (#13672) (#13674)
Clean backport of #13672 to 7.17 branch

----

Fixes an integration test that verifies the capabilities of CLI tool to install a not bundled plugin.
Move away from logstash-input-google_cloud_storage which depends indirectly to OS's package named shared-mime-info, which is not always available.

(cherry picked from commit 7bb56e46dd)
2022-01-25 16:33:31 +01:00
Ry Biesemeyer
319e67dceb
logging: move init into environment's settings post-processor (#13221) (#13663)
* logging: move init into environment's settings post-processor

Ensures that the non-runner command line utilities like `bin/logstash-keystore`
correctly initialize the logger as-configured.

* fixup: ensure we get ruby stdlib URI & File

(cherry picked from commit 2a5e54cd21)
2022-01-24 08:53:09 -08:00
Ry Biesemeyer
8d057881ae
stats api: startup resilience when stats are partially formed (#13645) (#13660)
(cherry picked from commit 4b430a5f69)
2022-01-24 07:39:31 -08:00
Ry Biesemeyer
fe4827132b
[Backport 7.17] Fix unit test under Windows (#13656) (#13665)
Backport #13656 to branch 7.17

----

Use the System.lineSeparator instead of "\n" to make the test portable across platforms

(cherry picked from commit 3fdc4c3aa7)

Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2022-01-24 10:05:55 +01:00
Ry Biesemeyer
22e2e52d9c
Backport PR #13612 to 7.17: [Docs] Add pipeline.ecs_compatibility to the list (#13638)
* [Docs] Add pipeline.ecs_compatibility to the list (#13612)

* Add pipeline.ecs_compatibility to the list

* Update docs/static/running-logstash-command-line.asciidoc

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

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit e11d0364d4)

* Rephrase docs for --pipeline.ecs_compatibility flag for 7.x perspective

Co-authored-by: Toby Sutor <55087308+toby-sutor@users.noreply.github.com>
2022-01-20 10:52:26 -08:00
Ry Biesemeyer
c8e2bef09b
field-reference: cap RUBY_CACHE to 10k entries (#13642) (#13655)
* field-reference: cap RUBY_CACHE to 10k entries

Reduces the scope of a memory leak that can be caused by using UUIDs or other
high-cardinality field names by preventing the ruby string _keys_ from being
held by the cache indefinitely.

Note: this may not solve the problem entirely, but certainly limits its impact.
      Because ConvertedMap requires individual field names to be interned into
      the global String intern pool, their eligibility for GC is JVM-specific
      and high-cardinality field names should still be avoided.

* noop: field-reference test refactor to consolodate reflection

(cherry picked from commit ca501acdcf)
2022-01-20 09:18:43 -08:00
Karen Metts
3c0b948a85
[DOC] Clarify scope of queue settings 7.17 (#13651)
Backports #12955 to 8.0

Author: Luca Belluccini <luca.belluccini@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Andrea Selva <andrea.selva@elastic.co>
2022-01-20 11:42:13 -05:00
Andrea Selva
779a4d5f13
[Backport 7.17] Fix Ruby port check execution in kafka_setup.sh (#13631) (#13640)
Clean backport of #13631 to 7.17

Original message:

When the Bash script executes the vendored Ruby it has to use proper `GEM_HOME` to avoid the overwrite that happens inside the logstash.lib.sh
3064f7d0c3/bin/logstash.lib.sh (L161-L165)

(cherry picked from commit 93f37b9609)
2022-01-20 08:58:19 +01:00
Andrea Selva
9c4fdf8892
[Backport 7.17] Fix/gems not found in integration test after plugin install (#13641) (#13643)
Clean backport of #13641 to 7.17

Original message:

Cleanly teardown an integration test that made fall other integration tests.
In some cases the CI integration tests fails because the launched Logstash can't find a gem named `mimemagic`. This gem is installed during a CLI plugin test (install of  `logstash-input-google_cloud_storage` plugins kicks in that `mimemagic`).

(cherry picked from commit 640ba8489f)
2022-01-20 08:56:52 +01:00
Ry Biesemeyer
89b3b54a85
bump dependencies for 7.17.0 (#13647) 2022-01-20 08:14:13 +01:00