Commit graph

8900 commits

Author SHA1 Message Date
Tom Callahan
4bfbdb28b8 Harmonize license with apache.org and other Elastic repos
The Logstash version of the Apache V2 license differs from the one
published at apache.org and in our other repos by a single newline.
This commit adds the newline.

Fixes #9707
2018-06-19 21:22:38 +00:00
Dan Hermann
4228d0b5e8 check free space on specified path rather than root folder
Fixes #9767
2018-06-19 18:24:46 +00:00
Armin
8dc46bece1 #9747 Correctly compare cases
Fixes #9760
2018-06-19 15:22:39 +00:00
Armin
c431aba536 #9708: Correctly handle non unicode event keys in serialization
Fixes #9764
2018-06-19 14:55:10 +00:00
Armin
cccd044c92 JAVAFICATION: Move more of the pipelines to Java
Fixes #9765
2018-06-19 12:02:11 +00:00
Dan Hermann
fbb167751e Correctly calculate millisecond duration.
Fixes #9744.

Fixes #9753
2018-06-18 17:37:37 +00:00
Armin
99b5f87f86 #9747 Fix Java Execution compilation breaking for datasets with more than 255 parents
Fixes #9755
2018-06-18 16:57:34 +00:00
Armin
c56d62f4ae JAVAFICATION: Cache filter callsite and dedup some method names
Fixes #9752
2018-06-18 13:27:26 +00:00
Armin
52e4f49177 JAVAFICATION: Move Ruby output calls to caching callsites
Fixes #9751
2018-06-16 14:50:27 +00:00
lcawl
643fa7df78 [DOCS] Adds link in breaking changes 2018-06-15 12:39:48 -07:00
Armin
7bf2d129d0 MINOR: Move more dynamic Ruby calls to typed Java calls
Fixes #9743
2018-06-15 14:29:35 +00:00
Armin
d34f64cb66 MINOR: Move some dynamic ruby calls to typed calls, clean up some duplicate constants
Fixes #9742
2018-06-15 06:44:32 +00:00
Armin
f8860884fa JRUBY: install custom JRuby tar.gz
Fixes #9731
2018-06-14 12:28:39 +00:00
Armin
5c6e3e71d7 JAVAFICATION: Cleanup OutputDelegatorExt
Fixes #9740
2018-06-14 12:28:16 +00:00
Armin
30e055b1bf JAVAFICATION: Move more of the Java pipeline to Java
Fixes #9723
2018-06-12 13:50:15 +00:00
Armin
6d0230aa4f PQ Repair Utility
Fixes #9710
2018-06-12 08:28:06 +00:00
Dan Hermann
cc6ee1aeeb port output_delegator_spec to Java
Fixes #9717
2018-06-08 13:06:12 +00:00
Jake Landis
d538b524f8 Fix relative path for arcsight module. Fixes #9714
Fixes #9715
2018-06-07 14:36:28 +00:00
Armin
76bb37166f TESTS: Fix RSpec CLI invocation
Fixes #9673
2018-06-07 12:39:11 +00:00
Armin
3c30459c80 JAVAFICATION: Move more of the pipeline code to Java
* More pipeline code pulled to Java superclass
* Stronger typing for PQ write client code

Fixes #9697
2018-06-07 09:59:13 +00:00
Tamara Braun
1cc5358892 Moved ConvergeResult to Java
Fixes #9699
2018-06-07 09:18:14 +00:00
Toby McLaughlin
208e480d97
[DOCS] Update config steps for open X-Pack (#9674) 2018-06-04 09:57:57 +10:00
Armin
060a8e3bd2 JAVAFICATION: Further dry up ruby and java pipeline and move more of their logic to Java
Fixes #9687
2018-06-01 04:39:44 +00:00
Andrew Cholakian
0a72df874d Use longer timeout for x-pack reload spec
This test flaked out on CI, so let's give it some more time before digging deeper.

Fixes #9695
2018-05-31 22:01:55 +00:00
Andrew Cholakian
5541e70dda Use logger not @logger in source_loader
This makes it consistent with the rest of the class.

I noticed we have some test failures due to @logger not existing. Probably an issue
from when the logger was javafied. This is causing test failures like: https://logstash-ci.elastic.co/job/elastic+logstash+6.x+multijob-unix-compatibility/os=oraclelinux/140/consoleFull

Will open a separate issue about the missing @logger var

```
An exception happened when converging configuration {:exception=>NoMethodError, :message=>"undefined method `error' for nil:NilClass", :backtrace=>["/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/logstash-core/lib/logstash/config/source_loader.rb:55:in `block in fetch'", "org/jruby/ext/thread/Mutex.java:148:in `synchronize'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/logstash-core/lib/logstash/config/source_loader.rb:54:in `fetch'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/logstash-core/lib/logstash/agent.rb:133:in `converge_state_and_update'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/logstash-core/lib/logstash/agent.rb:84:in `execute'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/logstash-core/spec/support/shared_contexts.rb:26:in `block in (root)'", "org/jruby/RubyBasicObject.java:1728:in `instance_exec'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/vendor/bundle/jruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:350:in `run'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/vendor/bundle/jruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:509:in `block in run_owned_hooks_for'", "org/jruby/RubyArray.java:1734:in `each'", "/var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/oraclelinux/vendor/bundle/jruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/hooks.rb:508:in `run_owned_hooks_for'", "/var/
```

Fixes #9691
2018-05-31 12:56:37 +00:00
Armin
0aa798f350 JAVAFICATION: Move QueueFactory to Java
Fixes #9693
2018-05-31 11:32:13 +00:00
Armin
0bbcf9a921 BUG: Fix incorrect pipeline shutdown logging
Fixes #9688
2018-05-31 08:40:40 +00:00
Lisa Cawley
e75156ea54
[DOCS] Moves management folder to docs (#9680) 2018-05-30 09:23:53 -07:00
Lisa Cawley
604ad7259f
[DOCS] Move monitoring folder to docs (#9677) 2018-05-30 09:02:39 -07:00
Lisa Cawley
ad16230a38
[DOCS] Moves security folder to docs (#9678) 2018-05-30 08:54:45 -07:00
Lisa Cawley
865389fd35
[DOCS] Move setup folder to docs (#9681) 2018-05-30 08:13:32 -07:00
Lisa Cawley
e9a2029f2e
[DOCS] Moves settings folder to docs (#9679) 2018-05-30 07:57:20 -07:00
Armin
6352001177 BUG: Fix incorrect type handling between Java pipeline and Ruby pipeline
Fixes #9671
2018-05-30 11:24:14 +00:00
Armin
9e4c8799df JAVAFICATION: Dry up and move pipelines to Java in part
Fixes #9676
2018-05-30 10:50:09 +00:00
Armin
b8bd364f27 BUILD: lock rake at 12.2.x
Fixes #9685
2018-05-30 09:53:57 +00:00
Armin
0f1be10565 BUILD: Force utf-8 file encoding in java compilation
Fixes #9685
2018-05-30 09:53:57 +00:00
Armin
417afd1c5a JAVAFICATION: Ported ShutdownWatcher to Java
Fixes #9670
2018-05-29 15:57:13 +00:00
Armin
6c4beadd29 MINOR: Remove unused GlobalMetrics
Fixes #9668
2018-05-28 12:10:06 +00:00
Armin
1a88b9e333 JAVAFICATION: Port Snapshot to Java
Fixes #9667
2018-05-28 06:46:19 +00:00
Tamara Braun
7d6acf1799 Port HooksRegistry to Java
Fixes #9665
2018-05-28 06:45:51 +00:00
Dan Hermann
75684020e5 port SecretStore to Java
Fixes #9662
2018-05-25 20:47:34 +00:00
ajrpayne
b217ddcedc If statement should be checking [geoip_dst][asn] (#9638)
If statement should be checking [geoip_dst][asn] not [geoip][asn] (#9638)
2018-05-25 15:55:39 -04:00
Armin
8103bff757 JAVAFICATION: Port RubyTimestamp test to JUnit
Fixes #9661
2018-05-25 12:07:50 +00:00
Dan Hermann
0a04d1456b minor cleanup -- removed unused requires, note class used only for Ruby pipeline
Fixes #9658
2018-05-24 22:36:56 +00:00
Karen Metts
3f58461cf7 Add settings for centralized pipeline mgmt
Fixes #9649
2018-05-24 19:59:46 +00:00
Andrew Cholakian
eae1cc0d0a Correctly CD between dirs in ci/acceptance-tests.sh
This correctly CDs back and forth between dirs and tracks things
with variables to make it easier on the brain than relative paths like '..'

Fixes #9657
2018-05-24 19:49:30 +00:00
Andrew Cholakian
03427d81a2 Fix VM halt task for acceptance tasks by CDing correctly
We were in the wrong dir before, we need to be in the qa dir to shutdown correctly

Fixes #9651
2018-05-24 14:01:31 +00:00
Andrew Cholakian
9311f8b8d0 The initial implementation of inter-pipeline comms doesn't handle inter-pipeline dependencies correctly.
It just blocks and doesn't handle the concurrency situation. One can think of the network of connected pipelines as a DAG (We explicitly ask users not to create cycles in our docs). In fact there are two different correct answers to the pipeline shutdown and reload problem.

When reloading pipelines we should assume the user understands whatever changes they're making to the topology. If a downstream pipeline is to be removed, we can assume that's intentional. We don't lose any data from upstream pipelines since those block until that downstream pipeline is restored. To accomplish this none of the `PipelineBus` methods block by default.

When shutting down Logstash we must: 1.) not lose in-flight data, and 2.) not deadlock. The only way to do both is to shutdown the pipelines in order. All state changes happen simultaneously on all piping via multithreading. As a result we don't need to implement a Topological sort or other algorithm to order dependencies, we simply issue a shutdown to all pipelines, and have ones that are dependent block waiting for upstream pipelines.

This patch also correctly handles the case where multiple signals cause pipeline actions to be created simultaneously. If we see two concurrent creates or stops, one of those actions becomes a noop.

Currently the Logstash plugin API has lifecycle methods for starting and stopping, but not reloading. We need to call a different method when a `pipeline` input is stopped due to a pipeline reload vs an agent shutdown. Ideally, we would enrich our plugin API. In the interest of expedience here, however, I added a flag to the `PipelineBus` that changes the shutdown mode of `pipeline` inputs, to be either blocking or non-blocking. It is switched to blocking if a shutdown is triggered.

This also reverts b78d32dede in favor of a better more concurrent approach without mutexes

This is a forward port of https://github.com/elastic/logstash/pull/9650 to master / 6.x

Fixes #9656
2018-05-24 13:59:39 +00:00
Armin
f439124f81 PQ: Improve ACK stability further
Fixes #9654
2018-05-24 13:37:57 +00:00
Andrew Cholakian
c99c5a2ff8 Fix Cloner to properly clone ruby strings
Currently, any invocation of clone, including pipeline->pipeline comms and the clone filter
won't actually clone the string data, just the structure. We may be missing other value types too.

This is a start however.

Fixes #9652

Fixes #9653
2018-05-24 12:33:27 +00:00