Commit graph

1654 commits

Author SHA1 Message Date
Joao Duarte
97515d6ee6 disable frequently failing test concurrentWritesTest
Fixes #9909
2018-08-16 13:11:12 +00:00
Joao Duarte
32027a44a9 disable spec/logstash/agent_spec.rb:409
Fixes #9908
2018-08-16 12:53:17 +00:00
Joao Duarte
9816af6c40 support more than 3 identifiers in cloud id
Fixes #9882
2018-08-09 13:14:26 +00:00
Joao Duarte
9f243d83f4 support port customization in cloud id
Fixes #9877
2018-08-08 10:47:42 +00:00
Ry Biesemeyer
d6f7f037f3
BREAKING: FieldReference - strict mode cutover (#9543)
* noop: swap expected/actual in tests so failures read correctly

* field_reference: fixes crash and adds many edge-case test cases

Some pathological inputs can cause `FieldReference#parse(CharSequence)` to
throw an `ArrayIndexOutOfBounds` exception, which hard-crashes the entire
Logstash process because this Java-based exception is not caught by the Ruby
plugins.

Instead, proactively throw a new runtime exception indicating that we
encountered illegal syntax, and adjust the ruby event wrapper to re-throw
a ruby RuntimeException that can be handled in the normal way.

Additionally, this commit adds specs for the current behaviour of a wide
variety of illegal-syntax inputs, to ensure we don't accidentally change
the current behaviour.

* field_reference: break legacy tokenizer out, lay groundwork for strict-mode

Extracts the bulk of the current `FieldReference#parse(CharSequence)` method
out into its own `LegacyTokenizer` class verbatim to simplify subsequent
review as we add a strict-mode tokenizer.

* field_reference: add strict-mode and compat-mode

Adds a strict-mode FieldReference tokenizer, which throws an illegal syntax
exception when it encounters illegal syntax.

Adds a compat-mode FieldReference tokenizer, which _warns_ when it encounters
an input that would produce a different output under the strict-mode parser,
but otherwise behaves the same as the legacy-mode parser

Enables users to opt-in to the strict-mode parsing, or to opt-out of the
warnings using a command line flag or a settings-file directive

* field_reference (BREAKING): remove LEGACY and COMPAT for 7.0
2018-07-23 10:42:48 -07:00
Ry Biesemeyer
db35ced2a7 hooks: fire pipeline_stopped when pipeline is stopped
Fixes #9627
2018-07-05 20:57:02 +00:00
Colin Surprenant
ac72778c52 backport a JRuby 9.1.16.0 stdlib resolv.rb patch in current 9.1.13.0 JRuby version
use Gem::Version to compare versions and improve comments

include JRuby license info
2018-07-04 13:30:12 -04:00
Josh Soref
c6cd247ec3 Multiple spelling corrections (#9782)
* spelling: actually
* spelling: already
* spelling: concurrency
* spelling: constructor
* spelling: destinations
* spelling: different
* spelling: elasticsearch
* spelling: encoding
* spelling: error
* spelling: explicitly
* spelling: failings
* spelling: falsey
* spelling: guarantees
* spelling: having
* spelling: implementation
* spelling: logstash
* spelling: module
* spelling: multiple
* spelling: omitted
* spelling: overridden
* spelling: pipeline
* spelling: raspberry
* spelling: receive
* spelling: recommended
* spelling: registered
* spelling: registering
* spelling: shutdown
* spelling: signal
* spelling: specified
* spelling: successful
* spelling: successfully
* spelling: valuefied
* spelling: vector
2018-07-04 10:41:10 +01:00
Ralph
947036682f #9724: Change usage note for --quiet
Fixes #9781
2018-06-28 16:39:58 +00:00
Andrei Hurynovich
c2a10417c4 Fix: Logstash fails to run if data.path is a symlink
Fixes #9706
2018-06-20 12:13:06 +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
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
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
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
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
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
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
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
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
Armin
91a23d53d1 PQ: Improve stability of ack logic
Fixes #9646
2018-05-24 06:30:44 +00:00
Andrew Cholakian
b78d32dede Synchronize state convergence to improve test stability
This (hopefully) fixes bugs like the one seen in https://logstash-ci.elastic.co/job/elastic+logstash+master+multijob--ruby-unit-tests/169/consoleFull

We got an error message like the one below.

This looks like concurrent stuff happened because the test directly invokes `converge_state_and_update`. This mutex should prevent the race from occurring

```
00:55:35     [ERROR] 2018-05-23 00:55:35.829 [Converge PipelineAction::Create<main>] create - Attempted to create a pipeline that already exists! This shouldn't be possible {:pipeline_id=>:main, :pipelines=>{:main=>{:pipeline_id=>"main", :settings=>"#<LogStash::Settings:0x56816357 @transient_settings={}, @settings={\"node.name\"=>#<LogStash::Setting::String:0x62f94470 @possible_strings=[], @name=\"node.name\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"15b67abeef07\", @validator_proc=nil>, \"path.config\"=>#<LogStash::Setting::NullableString:0x1d659cdd @possible_strings=[], @name=\"path.config\", @value=\"/tmp/studtmp-103b13a45b8fe779ee6b235b33ce483ac4c3db63372d41611bf7a95c0739\", @value_is_set=true, @klass=String, @strict=false, @default=nil, @validator_proc=nil>, \"path.data\"=>#<LogStash::Setting::WritableDirectory:0x40a3dffd @name=\"path.data\", @value=\"/tmp/d20180523-486-1a9nlli\", @value_is_set=true, @klass=String, @strict=false, @default=\"/opt/logstash/data\", @validator_proc=nil>, \"config.string\"=>#<LogStash::Setting::NullableString:0x68c2c3b7 @possible_strings=[], @name=\"config.string\", @value=nil, @value_is_set=false, @klass=String, @strict=false, @default=nil, @validator_proc=nil>, \"modules.cli\"=>#<LogStash::Setting::Modules:0x40b0c01b @name=\"modules.cli\", @value=nil, @value_is_set=false, @klass=LogStash::Util::ModulesSettingArray, @default=[], @validator_proc=nil>, \"modules\"=>#<LogStash::Setting::Modules:0x71023fa4 @name=\"modules\", @value=nil, @value_is_set=false, @klass=LogStash::Util::ModulesSettingArray, @default=[], @validator_proc=nil>, \"modules_list\"=>#<LogStash::Setting:0x2f005a4e @name=\"modules_list\", @value=nil, @value_is_set=false, @klass=Array, @strict=true, @default=[], @validator_proc=nil>, \"modules_variable_list\"=>#<LogStash::Setting:0x5121fb62 @name=\"modules_variable_list\", @value=nil, @value_is_set=false, @klass=Array, @strict=true, @default=[], @validator_proc=nil>, \"cloud.id\"=>#<LogStash::Setting::Modules:0x17574945 @name=\"cloud.id\", @value=nil, @value_is_set=false, @klass=LogStash::Util::CloudSettingId, @default=nil, @validator_proc=nil>, \"cloud.auth\"=>#<LogStash::Setting::Modules:0x77c8ab14 @name=\"cloud.auth\", @value=nil, @value_is_set=false, @klass=LogStash::Util::CloudSettingAuth, @default=nil, @validator_proc=nil>, \"modules_setup\"=>#<LogStash::Setting::Boolean:0x5a375d89 @name=\"modules_setup\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"config.test_and_exit\"=>#<LogStash::Setting::Boolean:0x4134746 @name=\"config.test_and_exit\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"config.reload.automatic\"=>#<LogStash::Setting::Boolean:0x29a32be0 @name=\"config.reload.automatic\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"config.reload.interval\"=>#<LogStash::Setting::TimeValue:0x1b01b5cb @name=\"config.reload.interval\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=3000000000, @validator_proc=nil>, \"config.support_escapes\"=>#<LogStash::Setting::Boolean:0x7b3a7837 @name=\"config.support_escapes\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"metric.collect\"=>#<LogStash::Setting::Boolean:0x650d3961 @name=\"metric.collect\", @value=true, @value_is_set=true, @klass=Object, @default=true, @validator_proc=nil>, \"pipeline.id\"=>#<LogStash::Setting::String:0x55c1f20b @possible_strings=[], @name=\"pipeline.id\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"main\", @validator_proc=nil>, \"pipeline.system\"=>#<LogStash::Setting::Boolean:0x4378aa95 @name=\"pipeline.system\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"pipeline.workers\"=>#<LogStash::Setting::PositiveInteger:0x6bab890d @name=\"pipeline.workers\", @value=nil, @value_is_set=false, @klass=Integer, @default=16, @validator_proc=#<Proc:0x67e16328@/opt/logstash/logstash-core/lib/logstash/settings.rb:334>>, \"pipeline.output.workers\"=>#<LogStash::Setting::PositiveInteger:0x3d6a9475 @name=\"pipeline.output.workers\", @value=nil, @value_is_set=false, @klass=Integer, @default=1, @validator_proc=#<Proc:0x3b40ad4f@/opt/logstash/logstash-core/lib/logstash/settings.rb:334>>, \"pipeline.batch.size\"=>#<LogStash::Setting::PositiveInteger:0xc14b8cb @name=\"pipeline.batch.size\", @value=nil, @value_is_set=false, @klass=Integer, @default=125, @validator_proc=#<Proc:0x60806242@/opt/logstash/logstash-core/lib/logstash/settings.rb:334>>, \"pipeline.batch.delay\"=>#<LogStash::Setting::Numeric:0x9a09b1b @name=\"pipeline.batch.delay\", @value=nil, @value_is_set=false, @klass=Numeric, @default=50, @validator_proc=nil>, \"pipeline.unsafe_shutdown\"=>#<LogStash::Setting::Boolean:0x373475b5 @name=\"pipeline.unsafe_shutdown\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"pipeline.java_execution\"=>#<LogStash::Setting::Boolean:0x1e4f4178 @name=\"pipeline.java_execution\", @value=nil, @value_is_set=false, @klass=Object, @default=true, @validator_proc=nil>, \"pipeline.reloadable\"=>#<LogStash::Setting::Boolean:0x7dbeb281 @name=\"pipeline.reloadable\", @value=nil, @value_is_set=false, @klass=Object, @default=true, @validator_proc=nil>, \"path.plugins\"=>#<LogStash::Setting:0x704b966e @name=\"path.plugins\", @value=nil, @value_is_set=false, @klass=Array, @strict=true, @default=[\"/tmp/studtmp-14955ca0fd3d079036abad8f09c7447c4227d5af0956ece8a86b5e239ed2\"], @validator_proc=nil>, \"interactive\"=>#<LogStash::Setting::NullableString:0x6446dc0f @possible_strings=[], @name=\"interactive\", @value=nil, @value_is_set=false, @klass=String, @strict=false, @default=nil, @validator_proc=nil>, \"config.debug\"=>#<LogStash::Setting::Boolean:0xe6057e @name=\"config.debug\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"log.level\"=>#<LogStash::Setting::String:0x8c49559 @possible_strings=[\"fatal\", \"error\", \"warn\", \"debug\", \"info\", \"trace\"], @name=\"log.level\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"info\", @validator_proc=nil>, \"version\"=>#<LogStash::Setting::Boolean:0x76648ce0 @name=\"version\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"help\"=>#<LogStash::Setting::Boolean:0x4699aaa7 @name=\"help\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"log.format\"=>#<LogStash::Setting::String:0x6adb8170 @possible_strings=[\"json\", \"plain\"], @name=\"log.format\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"plain\", @validator_proc=nil>, \"http.host\"=>#<LogStash::Setting::String:0x18ec9e0b @possible_strings=[], @name=\"http.host\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"127.0.0.1\", @validator_proc=nil>, \"http.port\"=>#<LogStash::Setting::PortRange:0x132bd323 @name=\"http.port\", @value=nil, @value_is_set=false, @klass=Range, @default=9600..9700, @validator_proc=#<Proc:0x25cd1037@/opt/logstash/logstash-core/lib/logstash/settings.rb:360>>, \"http.environment\"=>#<LogStash::Setting::String:0x793e0b6 @possible_strings=[], @name=\"http.environment\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"production\", @validator_proc=nil>, \"queue.type\"=>#<LogStash::Setting::String:0x7b733a89 @possible_strings=[\"persisted\", \"memory\"], @name=\"queue.type\", @value=\"memory\", @value_is_set=true, @klass=String, @strict=true, @default=\"memory\", @validator_proc=nil>, \"queue.drain\"=>#<LogStash::Setting::Boolean:0x7b8dbe51 @name=\"queue.drain\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"queue.page_capacity\"=>#<LogStash::Setting::Bytes:0x638367c6 @name=\"queue.page_capacity\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=67108864, @validator_proc=#<Proc:0x146be4d@/opt/logstash/logstash-core/lib/logstash/settings.rb:484>>, \"queue.max_bytes\"=>#<LogStash::Setting::Bytes:0x55fe764e @name=\"queue.max_bytes\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=1073741824, @validator_proc=#<Proc:0x43173596@/opt/logstash/logstash-core/lib/logstash/settings.rb:484>>, \"queue.max_events\"=>#<LogStash::Setting::Numeric:0x3bd2c765 @name=\"queue.max_events\", @value=nil, @value_is_set=false, @klass=Numeric, @default=0, @validator_proc=nil>, \"queue.checkpoint.acks\"=>#<LogStash::Setting::Numeric:0xf52b284 @name=\"queue.checkpoint.acks\", @value=nil, @value_is_set=false, @klass=Numeric, @default=1024, @validator_proc=nil>, \"queue.checkpoint.writes\"=>#<LogStash::Setting::Numeric:0x29b8e926 @name=\"queue.checkpoint.writes\", @value=nil, @value_is_set=false, @klass=Numeric, @default=1024, @validator_proc=nil>, \"queue.checkpoint.interval\"=>#<LogStash::Setting::Numeric:0x5379d202 @name=\"queue.checkpoint.interval\", @value=nil, @value_is_set=false, @klass=Numeric, @default=1000, @validator_proc=nil>, \"dead_letter_queue.enable\"=>#<LogStash::Setting::Boolean:0x7ebddee7 @name=\"dead_letter_queue.enable\", @value=nil, @value_is_set=false, @klass=Object, @default=false, @validator_proc=nil>, \"dead_letter_queue.max_bytes\"=>#<LogStash::Setting::Bytes:0x64618526 @name=\"dead_letter_queue.max_bytes\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=1073741824, @validator_proc=#<Proc:0xa7ea155@/opt/logstash/logstash-core/lib/logstash/settings.rb:484>>, \"slowlog.threshold.warn\"=>#<LogStash::Setting::TimeValue:0x170a9bda @name=\"slowlog.threshold.warn\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=-1, @validator_proc=nil>, \"slowlog.threshold.info\"=>#<LogStash::Setting::TimeValue:0x7d0353a @name=\"slowlog.threshold.info\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=-1, @validator_proc=nil>, \"slowlog.threshold.debug\"=>#<LogStash::Setting::TimeValue:0x6ff0d853 @name=\"slowlog.threshold.debug\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=-1, @validator_proc=nil>, \"slowlog.threshold.trace\"=>#<LogStash::Setting::TimeValue:0x10fbb8f1 @name=\"slowlog.threshold.trace\", @value=nil, @value_is_set=false, @klass=Fixnum, @default=-1, @validator_proc=nil>, \"keystore.classname\"=>#<LogStash::Setting::String:0x536c357f @possible_strings=[], @name=\"keystore.classname\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"org.logstash.secret.store.backend.JavaKeyStore\", @validator_proc=nil>, \"keystore.file\"=>#<LogStash::Setting::String:0x5513b3cd @possible_strings=[], @name=\"keystore.file\", @value=nil, @value_is_set=false, @klass=String, @strict=false, @default=\"/opt/logstash/config/logstash.keystore\", @validator_proc=nil>, \"path.queue\"=>#<LogStash::Setting::WritableDirectory:0x3c48db7c @name=\"path.queue\", @value=nil, @value_is_set=false, @klass=String, @strict=false, @default=\"/opt/logstash/data/queue\", @validator_proc=nil>, \"path.dead_letter_queue\"=>#<LogStash::Setting::WritableDirectory:0x7139c034 @name=\"path.dead_letter_queue\", @value=nil, @value_is_set=false, @klass=String, @strict=false, @default=\"/opt/logstash/data/dead_letter_queue\", @validator_proc=nil>, \"path.settings\"=>#<LogStash::Setting::String:0x434cd4a1 @possible_strings=[], @name=\"path.settings\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"/opt/logstash/config\", @validator_proc=nil>, \"path.logs\"=>#<LogStash::Setting::String:0xb898ade @possible_strings=[], @name=\"path.logs\", @value=nil, @value_is_set=false, @klass=String, @strict=true, @default=\"/opt/logstash/logs\", @validator_proc=nil>}>", :ready=><#Concurrent::AtomicBoolean:0x1ad0 value:true>, :running=><#Concurrent::AtomicBoolean:0x1ad4 value:false>, :flushing=>#<Java::JavaUtilConcurrentAtomic::AtomicBoolean:0x4ee76580>}}}
00:58:15           increases the successful reload count (FAILED - 1)
```

Fixes #9645
2018-05-23 13:34:27 +00:00
Andrew Cholakian
2c4cfeb990 Fix converge spec that didn't wait for agent to converge
This spec had a race, the start_agent invocation this depends on doesn't wait
until the state has converged at least once.

An example failure is here: https://logstash-ci.elastic.co/job/elastic+logstash+6.x+multijob-unix-compatibility/os=debian/121/console

The message was:

```
22:34:08     Failures:
22:34:08
22:34:08       1) LogStash::Agent Agent execute options when `config.reload.automatic` is set to`FALSE` and successfully load the config converge only once
22:34:08          Failure/Error: expect(source_loader.fetch_count).to eq(1)
22:34:08
22:34:08            expected: 1
22:34:08                 got: 0
22:34:08
22:34:08            (compared using ==)
22:34:08          # /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/logstash-core/spec/logstash/agent/converge_spec.rb:120:in `block in (root)'
22:34:08          # /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/spec/spec_helper.rb:50:in `block in /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/spec/spec_helper.rb'
22:34:08          # /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/spec/spec_helper.rb:43:in `block in /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/spec/spec_helper.rb'
22:34:08          # /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/vendor/bundle/jruby/2.3.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `block in /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/vendor/bundle/jruby/2.3.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb'
22:34:08          # /var/lib/jenkins/workspace/elastic+logstash+6.x+multijob-unix-compatibility/os/debian/lib/bootstrap/rspec.rb:13:in `<main>'
22:34:08
22:34:08     Finished in 5 minutes 27 seconds (files took 8.75 seconds to load)
22:34:08     2877 examples, 1 failure, 5 pending
```

Fixes #9643
2018-05-23 00:35:30 +00:00
Andrew Cholakian
4c767c059e Wait longer and more reliably for agent specs.
These agent specs occasionally time out. This removes our use of the unreliable Timeout gem
and also lengthens the waiting period before failure

Fixes #9639
2018-05-22 20:58:19 +00:00
Andrew Cholakian
fb16b7b984 Shutdown agent after pipelines
I actually am not sure if this matters, but it seems like it won't hurt,
and is a more sane ordering of things. I have a suspicion that in some cases
the agents get stuck and don't shut down because of this ordering, but I can't
prove it

Fixes #9628
2018-05-22 14:51:17 +00:00
Armin
a9217255a7 JAVAFICATION: Port pipeline reporter to Java
Fixes #9631
2018-05-22 12:47:13 +00:00