Commit graph

10117 commits

Author SHA1 Message Date
Rob Bavey
1a0d5c961f Use branch appropriate version of Elasticsearch
Carrying on from the work done in #11958, update the gradle build to download
the same version of Elasticsearch as is specified in the logstash version.yml file.
This commit updates the standard integration tests to use the same version of
Elasticsearch that is already downloaded for x-pack integration tests, and also
fixes integration tests to allow for the different responses around hits generated
by different versions of Elasticsearch.
2020-06-16 13:32:16 +00:00
Karen Metts
b5528c5ffa Doc:Add link to JVM section of support matrix
Add link to support matrix as official word on supported versions.
2020-06-12 15:00:15 +00:00
Joao Duarte
7f58596643 remove uses of JSON.load in favor or JSON.parse
JSON.load allows the creation of complex objects, and should not
be given untrusted input. This commit changes the only three uses
of JSON.load in the codebase, which aren't user facing or present
in bundled product, so not really an attact vector.
2020-06-12 14:48:05 +00:00
Rob Bavey
addcb8a0a7
Retrieve branch version of Filebeat via gradle (#12011)
Clean backport of #11958

This commit changes the download to pull the version of beats based on the version pulled from the branch rather than from an environment variable, or 6.5.4.
This commit also moves the download logic of Filebeat fromfilebeat_setup.sh to build.gradle in order to use the artifacts API in the same way as the downloadEs task, and does some refactoring to DRY up the artifact download tasks.
This commit also fixes the beats integration test to replace the use of a removed setting.
This commit also sets retries to 3 for the download tasks, using 'retries' functionality from gradle download task plugin
2020-06-12 09:27:18 -04:00
Joao Duarte
8d53676aac retry on failed gradlew wrapper command in Dockerfile 2020-06-12 09:18:11 +00:00
Colin Surprenant
58b6e4d1c6 add commented out options for api_key in logstash.yml 2020-06-10 20:49:41 +00:00
Karen Metts
6832040d28 Doc:Add section and update JVM settings
This work breaks out the JVM setting info into a new section, and
expands and updates the content. It adds new subheadings to make
scanning the content easier.
2020-06-10 20:18:14 +00:00
Karen Metts
9bb792a0d6 Incorporate review comments
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
610abaaf99 Wording tweak
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
335032dc3f Expand event ordering
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
9597ab1eea Add content for pipeline ordering and init time
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Karen Metts
9aec969045 Add section for conceptual info
Backport of #11715 to 7.x
2020-06-09 21:27:10 +00:00
Rob Bavey
c23360fc44 Add java8 to test matrix 2020-06-09 19:03:06 +00:00
Joao Duarte
33b6059aab Revert "upgrade google-java-format to 1.8"
This reverts commit 2229468f11.

google-java-format 1.8 is Java 11 only, so we can't use it
as Logstash is supported on Java 8.
2020-06-09 18:00:33 +00:00
Joao Duarte
ecbc7aa150 remove explicit return from Mutex#synchronize in Plugin Registry
ruby produces a LocalJumpError: unexpected return
error if there's a return in a block so this changes just uses
the value of the last expression as the value of the block
2020-06-09 16:59:10 +00:00
Joao Duarte
3248317eac upgrade google-java-format to 1.8 2020-06-09 16:58:36 +00:00
Joao Duarte
e5f1e613ef update log4j script routes definition
fixes the change introduced with https://issues.apache.org/jira/browse/LOG4J2-2647
2020-06-09 13:26:30 +00:00
Joao Duarte
216fa60b23 update log4j dependency to 2.13.3 2020-06-09 13:26:30 +00:00
Joao Duarte
8b44f37a06 update commons-codec to 1.14 2020-06-09 13:26:30 +00:00
Rob Bavey
2deb5c02ad Fix prepare_offline_spec.rb test
The 'prepare_offline_spec.rb' is failing due to a change in the warning message
from JDK11 to JDK14, and JAVA_TOOL_OPTIONS being passed in as an environment
variable by Jenkins, which was not happening before due to the dockerized
environment.

Fixes #11933
2020-06-08 15:22:42 +00:00
Rob Bavey
ace1dd1318 [7x backport] Escape test fixture service scripts
Backport of #11931

Escape test fixture service scripts to avoid test failures when run in
Jenkins using multiple yaml configuration files, which causes directories
to be constructed like `centos-7&&immutable` which cause issues with
the service runners cutting off directory locations before '&&'

This commit deviates from the original commit by not setting @setup_script
and @teardown_script variable with the Shellwords escape, as this was removed
in a subsequent commit (#11944)
2020-06-08 07:50:52 -07:00
Rob Bavey
20a30f823a Give more options for testing with ruby while waiting for port
Try system ruby, then LS_HOME/bin/ruby, then relative path from
script to LS_HOME/bin/ruby. Use LS_RUBY_HOME variable to avoid
testing again on subsequent attempts to wait for port.
2020-06-08 14:36:31 +00:00
Andres Rodriguez
efc31ff842 Adds matrix-runtime-javas.yml (#11973)
This adds the .ci/matrix-runtime-javas.yml file that defines all
the JDKs logstash could be tested against. This is meant to be
used for the Matrix Combinations Jenkins plugin to be able to
select which JDK to test against dynamically.
2020-06-05 12:17:19 -07:00
Karen Metts
3fcd117b84 Doc:Add section to security docs for API keys 2020-06-05 18:17:06 +00:00
andsel
8b6c524702 better specification of the behaviour of in operator in various contexts 2020-06-05 15:18:19 +00:00
andsel
d4e82663f6 added description of xpack.monitoring.elasticsearch.proxy
After the merge of PR #11799 to expose the ES proxy configuration the doc should be aligned
2020-06-05 14:49:51 +00:00
andsel
24d60b81c2 Exposed again the pipelines queue.data and queue.capacity subdocuments for _node/stats
Avoid to reassing the subdocument for queue metrics preferring a merge
With PR #10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.

Fixes #11970
2020-06-05 13:39:08 +00:00
andsel
f3f6ca049f Fix integration tests related to logs when persistent_queue FEATURE_FLAG is enabled
Updated log4j definitions used when FEATURE_FLAG=persistent_queue is used.

Closes #11924

Fixes #11970
2020-06-05 13:39:08 +00:00
andsel
326b1c1ed1 Pass FEATURE_FLAG as Docker environment variable
Some QA tests reads the FEATURE_FLAG environment variable, for example to test PQ functionality.
This PR passthrough the environement variable inside the Docker instance.

Fixes #11970
2020-06-05 13:39:08 +00:00
Andres Rodriguez
709602d9c0 [7x backport] Drop unnecessary os files from .ci (#11959)
This commit drops unnecessary .ci config files defining distros,
as it is not used. This also temporarily enables adoptopenjdk11
testing on Windows.
2020-06-05 06:34:29 -07:00
Rob Bavey
4ab9e9c4f0 [7x backport] Add openjdk14 to windows build matrix (#11971)
openjdk14 appears to be the only version of java14 installed on jenkins windows
worker nodes, so use this instead of zulu14 and adoptopenjdk14

Backport of #11971
2020-06-05 06:34:29 -07:00
Rob Bavey
e810f96e6a Use BUILD_JAVA_HOME FOR JAVA_HOME in xpack integration tests 2020-06-04 14:33:51 +00:00
Karen Metts
a278276ecf
Forwardport: Add 7.7.1 release notes to 7.x branch (#11964)
Forwardports #11954 to 7.x
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2020-06-03 11:58:20 -04:00
Colin Surprenant
5e62c96c19
add support for api_key authentication in xpack management and monitoring. (#11953)
7.x backport of #11864
2020-06-03 10:57:36 -04:00
Rob Bavey
fa75ac2780 Disable flaky multiReceiveRecordsDurationInMillis test
Relates #11956
2020-06-02 21:00:43 +00:00
Rob Bavey
85e5057788
[7.x backport] Fix service script execution when path includes && (#11944) (#11948)
Backport of #11944

A previous commit attempted to fix this issue by adding Shellwords.escape to setup_script and teardown_script locations, but File.exists? returns false when called against a filename escaped by Shellwords.escape. This commit localizes the escaping to where the
file is executed.

This commit also adds Shellwords.escape to teardown script runner and the method used to execute logstash to retrieve version. This is to enable tests to run correctly when Jenkins creates execution environments with folders named with &&, eg centos-7&&immutable
2020-06-02 10:45:01 -04:00
Colin Surprenant
94f282c880 display Java pipeline initialization time
Fixes #11749
2020-06-01 20:23:04 +00:00
Rob Bavey
b28fa3e7df Set beats permission checking to strict=false
When running filebeats integration tests on centos-7, the tests
fail due to permsisions checks on the temporary configuration file
created for the test. This commit sets strict permissions checks
to false in order for the tests to be able to succeed.

Fixes #11949
2020-06-01 18:40:41 +00:00
Rob Bavey
1ed6523e83 Fix typo
Fixes #11942
2020-05-29 16:46:52 +00:00
Rob Bavey
8cce2091d3 Switch 'no nc' port checker to ruby
Use ruby to test for port, rather than just sleeping

Fixes #11942
2020-05-29 16:46:52 +00:00
Rob Bavey
e4a5134760 Enable fallback to sleep if nc not installed
Fixture test scripts use `nc` to wait for the port to determine
whether a test fixture is up and running. This commit adds a fall
back option to sleep if `nc` is not available - it is not installed
on Jenkins centos worker nodes.

Fixes #11942
2020-05-29 16:46:52 +00:00
Rob Bavey
b2da4449a5
Use task avoidance API in gradle scripts (#11914) (#11943)
* Use task avoidance API in gradle scripts

This commit uses the task avoidance api (tasks.register vs task.create/
task DSL), as recommended since Gradle 5.1

This should reduce the execution of unnecessary tasks in build jobs, and
hopefully improve build resiliency and execution time.
2020-05-29 11:52:01 -04:00
Joao Duarte
aeb46de6cc emit deprecation entry for netflow and azure modules
point users towards the beats modules instead
2020-05-29 14:43:40 +00:00
Andrea Selva
c5b6a853d6
Introduced JDK environment variable to explicitly pass the JAVA_HOME to use and defined .ci/ with OS and JDK preferences (#11934) 2020-05-27 16:48:39 +02:00
Rob Bavey
84dd62a0a1 Ignore flaky testTimeCallable test
Flaky test issue #11925
2020-05-26 17:28:17 +00:00
Rob Bavey
ffcba6faf9 Quieten down kafka teardown script
Kafka teardown script can exit with failure, typically when trying to
stop the broker. This commit logs the error code if the scripts fail
rather than crash out causing build failure.

Fixes #11905
2020-05-19 14:19:56 +00:00
Karen Metts
1c4df35e0c Doc:Replace cloud trial notice with attribute
Replaces free text with an attribute that pulls in shared content to
keep content up-to-date and consistent across documents.
2020-05-19 00:28:45 +00:00
Karen Metts
24987d4fdd Doc:Add deprecation notice for azure module 2020-05-18 22:39:42 +00:00
Joao Duarte
881099c39f download kafka from another mirror
the current mirror now refuses connections for the past 36 hours

Fixes #11887
2020-05-11 08:15:37 +00:00
Karol Bucek
ecdf8715e7 Fix: avoid gsub (frame dependent) usage from Java
`RubyString#gsub` requires a (Ruby) frame to be present.
The method attempts to set a backref for the current caller's frame.
When the frame stack is empty there isn't really a place to set $~.

This can happen when a LogStash::Util::Loggable#logger is retrieved,
from the input worker thread while not being nested in any block.

Fixes #11874
2020-05-07 18:00:23 +00:00