Commit graph

8588 commits

Author SHA1 Message Date
Armin
d989517f83 Some cleanup in queue java code
Fixes #7047
2017-05-11 21:42:30 +00:00
Armin
0020c4beab #6785 spec for nested case added
Fixes #7072
2017-05-11 18:40:14 +00:00
Armin
83a8603284 6785 interpolate settings after flattening settings hash
Fixes #7072
2017-05-11 18:40:13 +00:00
Armin
6bf4eddaff 6785 test windows style interpolation
Fixes #7072
2017-05-11 18:40:13 +00:00
Armin
9f1d889c27 #6785 Interpolate ENV into settings read from logstash.yml
Fixes #7072
2017-05-11 18:40:13 +00:00
Joao Duarte
b7f4f9d649 fix remaining race condition in monitoring api integration spec
* add NoMethodError to list of allowed exceptions in try
2017-05-11 18:25:13 +01:00
Joao Duarte
d17a77e76d bump version to 6.0.0-alpha2 2017-05-11 18:18:29 +01:00
Andrew Cholakian
623fe51474 Rename Pipeline -> PipelineIR + Fix PipelineIR concatenation
This PR helps enable https://github.com/elastic/logstash/issues/7076

This also fixes a bug where when concatenating pipelines for PipelineIR
the to_s versions of the SourceWithMetadata objects were conjoined
instead of just the `text`.

Fixes #7079
2017-05-11 17:11:47 +00:00
Pier-Hugues Pellerin
0eb5342480 fix the ordering issue with the proxy test
Depending of the order of the test some test didn't not clear correctly
the environment.

Fixes #7080
2017-05-11 16:21:56 +00:00
Joao Duarte
838f593d1a fix monitoring api integration race condition
because the metric subsystem may not be ready yet when the tests ask for
the values, the test code may generate a NoMethodError accessing nested
hashes.

The NoMethodError exception aborts the try mechanism instead of retrying.

This PR rescues potential exceptions and adds more expectations to
protect the try block.

Fixes #7074
2017-05-11 13:06:58 +00:00
Pier-Hugues Pellerin
1113f0cffc refactor extract into 2 methods
Fixes #7065
2017-05-11 12:54:44 +00:00
Pier-Hugues Pellerin
276c6e9602 Check for empty string when configuring proxies
On some Linux system like debian, the `HTTP_PROXY` are set to an empty
string and was causing the plugin manager to raise an exception. We now
strip the string and check if it is empty before trying to configure the
proxies.

Fixes: #7045

Fixes #7065
2017-05-11 12:54:44 +00:00
Jordan Sissel
e838cc7abf Skip a flakey test failing since November 2016
The failure:

    Failures:

      1) LogStash::Pipeline defaulting the pipeline workers based on thread safety when there are threadsafe filters only starts multiple filter threads
         Failure/Error: expect(pipeline.worker_threads.size).to eq(worker_thread_count)

           expected: 5
                got: 8

Related issues: #6855, #6245, #6355

Fixes #7071
2017-05-11 09:45:19 +00:00
Joao Duarte
2b7b8f0d81 make integration specs a bit more resilient
* wait for logstash starting in monitoring_api integration tests
* remove initialization code from monitoring api integration spec
2017-05-11 10:24:57 +01:00
Joao Duarte
cad59d9304 fix a few racing conditions in the agent_spec
Fixes #7066
2017-05-11 09:17:32 +00:00
Andrew Cholakian
9f36ea1620 Ignore java build files in logstash-core
Fixes #7070
2017-05-11 02:38:45 +00:00
Andrew Cholakian
2b4afea696 Add original source metadata to LIR pipeline
This is a temporary change until we have LIR execution. This allows the
LIR Pipeline object to be the only object passed into the ruby Pipeline.
The ruby Pipeline needs the source to parse the file into the legacy AST
format.

Fixes #7055
2017-05-10 17:58:26 +00:00
Andrew Cholakian
804788c7fe Compile multiple sources together into one LIR pipeline
This sets us up to correctly set the protocol / metadata fields for LIR
pipelines and work on the refactor mentioned in https://github.com/elastic/logstash/issues/7054

Fixes #7055
2017-05-10 17:58:25 +00:00
Armin
d979c8cf04 gitignore .lock
Fixes #7052
2017-05-10 13:29:07 +00:00
Tal Levy
458910bcb9 Introduce DeadLetterQueue to the Execution Context (#6894)
* Introduce a DeadLetterQueueFactory

DeadLetterQueueFactory is a static class that keeps
a static collection of DeadLetterQueueWriteManagers per
pipeline that has plugins requesting to use it.

* DeadLetterQueue was added as a first-class field in the execution context that input/filter/output plugins can leverage
2017-05-09 14:40:59 -07:00
Suyog Rao
69f5e46b0b [docs] Add release notes to 6.0 alpha1 2017-05-09 09:56:27 -07:00
Suyog Rao
cde8f88e47 Add -prerelease to yum sources 2017-05-09 09:39:51 -07:00
Suyog Rao
8ab7e2372a [docs] Mark as prerelease 2017-05-09 09:34:59 -07:00
João Duarte
db2c85c5e9 only auto complete config.string (#6974)
this means the configuration read from path.config (-f) is no longer auto completed with stdin/stdout if the input/output sections are missing. This behaviour will only occur with config.string (-e).
2017-05-09 17:30:16 +01:00
Suyog Rao
553dd60819 Add 6.0.0-alpha1 release notes 2017-05-09 09:03:33 -07:00
João Duarte
07194b830f make e and f flags mutually exclusive (#6976) 2017-05-09 16:42:32 +01:00
Andrew Cholakian
3658c94e9b Refactor SourceLoader to no longer be a singleton.
This cleans up the code from a design patterns standpoint and makes testing plugins easier since you can just create/destroy agents at will.

Without this change the SOURCE_LOADER singleton's state will become dirty as agents are created/destroyed and be problematic.

Fixes #7048
2017-05-09 00:00:02 +00:00
Wainer dos Santos Moschetta
6b282234cb ci: fix run single specs
Some integration spec tests fail to run
individually due missing require modules.

This fix it by ensuring all specs and helpers
require the needed modules.

Fixes #7037

Fixes #7038
2017-05-06 01:30:33 +00:00
DeDe Morton
45affa3f6e Add changes from the review
Fixes #6988
2017-05-05 01:54:28 +00:00
DeDe Morton
a912fea0f1 Document popular processing capabilities
Fixes #6988
2017-05-05 01:54:27 +00:00
DeDe Morton
31b2a36346 Add note to clarify at-least-one guarantee statement
Fixes #7029
2017-05-04 20:31:17 +00:00
Pier-Hugues Pellerin
b709eb5c68 Fix when settings set in the pipeline_pq_file_spec bleed into other examples
make sure we clone the LogStash::Settings before mutating it.

Fixes: #6868

Fixes #6981
2017-05-04 17:21:43 +00:00
Pier-Hugues Pellerin
4c3a3ad526 Normalize the Alpha version of Logstash
If you use 6.0.0-alpha1, rubygems will change it to 6.0.0.pre.alpha1,
this commit changes the behavior to normalize the version before saving
it to disk.

Fixes #7008
2017-05-04 17:16:55 +00:00
DeDe Morton
23e195b48b Replace images in deployment guide
Fixes #7025
2017-05-04 16:42:39 +00:00
Armin Braun
68aa662491 #7022 unopened queue was throwing npe
Fixes #7023
2017-05-04 15:59:39 +00:00
Pier-Hugues Pellerin
2b3d494bbe Make the Logstash metric check for the timestamp on reload success more robust
The current implementation of the test was using a mock and an expect
on the internal classes to determine when to start testing on the
metrics. I've rewrote the setup of the test to use the file output instead of using a
instance. I believe the previous code was not completely threadsafe and was causing this error
in the spec. We should really remove any mock of the form expect_any_instance_of`.

Ref: #6935

Fixes #6956
2017-05-04 14:21:06 +00:00
Pier-Hugues Pellerin
a758412499 Replace the class declaration with let statements
Instead of using a concrete class use let statement instead, this make
sure they are reset between run and make the variable available at the
context level.

Fixes #7017
2017-05-04 13:05:24 +00:00
Armin Braun
9f2ce5d164 #6518 rebased and adjusted naming
Fixes #7010
2017-05-04 09:03:26 +00:00
Toby McLaughlin
a76375d094 Add docs for settings via env vars on Docker (#7015) 2017-05-03 22:21:44 -07:00
Pier-Hugues Pellerin
7bc91b7ceb Adding guards on the SourceLoader#fetch
When the fetch is call we are aggregating all the pipeline_config from
the different sources, if we encounter duplicates ids we will return a
failure, making the pipeline skip that fetch.

Fixes #6866
2017-05-03 21:45:57 +00:00
Pier-Hugues Pellerin
17b2218565 Allow to ask the registry to get a list of plugin klass of a specific type
This expose some of the internal of the registry to the outside world to
allow other part of the system to retrieves plugins.

This change was motivated by #6851 to retrieve the installed list of
modules.

Fixes #7011
2017-05-03 21:43:57 +00:00
TAC
f5fb4b3f9f Fix missing log4j2.properties file on Windows
fix Issue #6352

On Windows, Logstash can't find log4j2.properties file with above message at startup.
```
Could not find log4j2 configuration at path /LS_HOME/config/log4j2.properties.
```

Fixes #6903
2017-05-03 19:30:42 +00:00
DeDe Morton
b1a0af6103 Update LS deployment docs with Alvin's content
Fixes from review

Fixes #7005
2017-05-02 22:07:56 +00:00
Andrew Cholakian
28e51f5c6a Unify ConfigPart and SourceMeta into SourceWithMetadata
This unifies the two different config classes that represented mainly
the same data. While this does expose a plain java class into ruby
this works fine because ruby only needs to access and set values, not
work with ruby return types.

Fixes #7003

Fixes #7004
2017-05-02 13:31:06 +00:00
Armin Braun
4bb6d34919 removed .lock gitignore
Fixes #6985
2017-05-02 13:23:34 +00:00
Armin Braun
e6ea222c33 bundler.rb fixes for @pr review
Fixes #6985
2017-05-02 13:23:34 +00:00
Armin Braun
2f47cfd076 Allow copying a release template for Gemfile.jruby-1.9.lock.release
Fixes #6985
2017-05-02 13:23:34 +00:00
Armin Braun
8e9840f298 ignore .Gemfile.jruby-1.9.lock, .lock and Gemfile
Fixes #6985
2017-05-02 13:23:34 +00:00
Armin Braun
01b4144dfe #4324 streamline behaviour of Timestamp.== and Timestamp.eql?
Fixes #7002
2017-05-02 10:45:27 +00:00
DeDe Morton
e728b5eb4a Remove beta/experimental flags for features that are GA in 5.4
Fixes #6989
2017-04-28 23:20:48 +00:00