Commit graph

52 commits

Author SHA1 Message Date
Pier-Hugues Pellerin
b0bea8b0ba Gemfile for 2.2.4
Fixes #5058
2016-04-07 15:33:18 +00:00
Pier-Hugues Pellerin
ed71af979d 2.2.4.snapshot2
Fixes #5045
2016-04-06 20:46:42 +00:00
Pier-Hugues Pellerin
6c7735fb30 Preparations 2.2.4.snapshot1
Fixes #5042
2016-04-06 19:59:44 +00:00
Pere Urbon-Bayes
f5a89636b3 Hide sensitive AST/config data unless --debug-config argument passed 2016-04-05 16:29:52 -05:00
Andrew Cholakian
283c140132 Prevent config leak on output delegator close
On shutdown logstash may leak config information for outputs including
plaintext passwords

Fixes #5001
2016-04-05 20:56:26 +00:00
Joao Duarte
d29e7e3a67 avoid reusing generic validation method during params securization
Fixes #4952
2016-03-31 19:15:32 +00:00
Joao Duarte
6c800198b6 ensure Plugin#original_params is obfuscated
Fixes #4952
2016-03-31 19:15:32 +00:00
Suyog Rao
7e69c1ef94 Release 2.2.3 2016-03-29 12:08:52 -07:00
Suyog Rao
35753a1272 Bump version to 2.2.3.snapshot2
Had to yank snapshot1 because of a typo in dependency
2016-03-25 14:11:28 -07:00
Andrew Cholakian
60a6d9c2c7 Fix threadsafe workers in output delegators to not instantiate extras Cherry pick of db9e67802fb1f6cd097bcac0a7aa59a3a453ceb1 from master Originally from https://github.com/elastic/logstash/pull/4763
Fixes #4894
2016-03-24 21:11:53 +00:00
Andrew Cholakian
5745b3412f Fix oops backtrace logging, it should be structured
Fixes #4724
2016-03-03 16:26:57 +00:00
Suyog Rao
630dd012ba Bump version to 2.2.2 2016-02-17 16:34:16 -08:00
Suyog Rao
a0a4c72c8f Bump to 2.2.1 version 2016-02-11 17:55:47 -08:00
Andrew Cholakian
cf31ef8e76 This brings back --filter-workers for the 2.x series. This will be gone in the next major version
Fixes #4669

Fixes #4672
2016-02-10 22:57:31 +00:00
Suyog Rao
1b3518996e Use the right keys in locale to describe CLI flags
Fixes `-w, --pipeline-workers COUNT  translation missing: en.logstash.runner.flag.pipeline-workers (default: 8)`

Fixes #4661
2016-02-09 17:02:55 +00:00
Suyog Rao
42b9a1dfdb Release a 2.2.1.snapshot1 version
Bump versions, update lock file
2016-02-08 12:37:40 -08:00
Andrew Cholakian
0b02d1a4eb Add specs to code around flusher initialization order
Fixes #4623
2016-02-04 16:41:33 +00:00
Andrew Cholakian
51d5a0fb08 Fix flusher initialization to prevent race breaking flushing
If start_flusher is called before @running is set to true it may shut itself
down before it truly starts. This fixes that bug.

Fixes #4623
2016-02-04 16:41:33 +00:00
Suyog Rao
2adde524e6 Bump to 2.2.0 and update lock file
Fixes #4597
2016-02-01 15:53:47 +00:00
Pere Urbon-Bayes
2248fc35bb add test to verify that a cloned codec is only registerd once
Fixes #4533
2016-01-21 16:33:58 +00:00
Pere Urbon-Bayes
4e1f87e588 remove unnecessary re register when doing deep clone for codecs
Fixes #4533
2016-01-21 16:33:58 +00:00
Suyog Rao
1dd262996d Go back to 0.9.13 of openssl 2016-01-14 10:40:29 -08:00
Suyog Rao
4ebdfabbe9 Bump to snapshot3, update lock files 2016-01-14 10:13:39 -08:00
Guy Boertje
88e399238c Better method of ensuring that args are not mutated by plugin initialize
add test for subclasses of codec, filter, input and output

Register codec clone, use String clone not dup so frozen strings stay so

Fixes #4444

Fixes #4473
2016-01-14 14:15:55 +00:00
Joao Duarte
0b358480ca distinguish between user set and default pipeline settings 2016-01-13 10:13:12 +00:00
Andrew Cholakian
0e25b91b29 Check integer values for pipeline arguments
Fixes #4448

Fixes #4456
2016-01-11 23:29:01 +00:00
Suyog Rao
a1c7bbf06b Bump version to 2.2.0.snapshot2
Bump version, update gem and lock file to point to RubyGems.org
in preperation for 2.2.0 release
2016-01-08 18:13:22 -08:00
Suyog Rao
7e78e9d0ae Pin jruby-openssl to latest released version
Fixes #4437

Fixes #4438
2016-01-08 22:17:44 +00:00
Joao Duarte
902e127d71 rename pipeline-worker settings to symbols
Fixes #4430
2016-01-07 18:58:40 +00:00
Andrew Cholakian
79089312bb Code cleanup per PR review in OutputDelegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
cddf53e9f2 Link to jruby issue in OutputDelegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
379dfd80d3 Remove unnecessary logger line used for debugging in outputdelegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
0770d02e05 Cleanup code around warnings around outputs with no workers allowed
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
d93b4d60f2 Add debug log for determining the number of output workers for output delegator
Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
b7979ebf6f Fix jruby 1.7.x bug around define_singleton_method.
We were getting some bizzare
errors (https://github.com/elastic/logstash/pull/4391#issuecomment-169477728)
on the file output with the new OutputDelegator changes. By switching
away from method(:mymethod) to blocks with define_singleton_method they
went away.

This bug is only present with Jruby 1.7.x (tested with 1.7.22 and
1.7.23). Jruby 9.x is fine.

Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
00c74d84e1 Improve OutputDelegator implementation and specs.
Backwards compatibility is now implemented for existing workers_not_supported uses.

This clears up a few bugs in the initial pass as well.

Fixes #4391
2016-01-07 17:19:10 +00:00
Andrew Cholakian
67d0a8e4ef Improved semantics for OutputDelegator This commit greatly improves the semantics for the OutputDelegator. It now: * Has an API for declaring if an output is threadsafe to avoid instance creation * By default sets the number of workers for an output to be == the number of pipeline workers * Moves the worker safe API to the class, not instance level * Strongly enforces the worker safety API * Should provide better performance for threadsafe plugins
Fixes #4391
2016-01-07 17:19:10 +00:00
Pier-Hugues Pellerin
27e675ce7a Replace def #{type}_func with define_singleton_method
When you run multiples pipeline and the config code get evaluated, on
every evaluation the class cached is clear, everytime you were calling a
`func` method you had the latest evaluated code. The `filter_func` and
the `output_func` need to be unique for every instance of the pipeline,
this PR replace the `def` with a `define_single_method` call ensuring
the uniqueness of the code on every instance.

This PR is based on #4254

Fixes #4298
2016-01-06 20:11:21 +00:00
Pier-Hugues Pellerin
5cb96d3971 Remove sized_queue.rb
Since Logstash 2.2, we now use Java SynchronousQueue instead of ruby
sizequeue

Fixes #4422
2016-01-06 19:22:50 +00:00
Joao Duarte
b887705acd rename ShutdownController to ShutdownWatcher
slightly adjust the metaphor for the class that is responsible for
monitoring a pipeline's shutdown process, report on its status and
intervene if it's stalled
2016-01-05 17:41:05 +00:00
Andrew Cholakian
372e5e62df Up default # of pipeline workers to 100% of cores
This is predicated on the fact that with the ng_pipeline it is expected that workers
will spend a significant amount of time in iowait due to outputs like the Elasticsearch
output. In benchmarks based on real-world Apache log files the best performance came out
of scenarios where pipeline_workers > num_cpu_cores. Setting this to default to the # of
cores is a defensive decision that should handle cases where users have particularly IO
heavy inputs.

For most users we should recommend setting the number of workers to be as high as possible
until performance decreases.

Previous benchmark information:
https://github.com/elastic/logstash/pull/4340

Fixes #4414
2016-01-05 17:01:23 +00:00
Pier-Hugues Pellerin
1d8b88a706 Add a WrappedSynchronousQueue#offer method
Expose the Java's `#offer` method of the `SynchronousQueue` class,
This method allow the input developper to correctly apply back pressure
to the network clients.

If you use `#push` it will block forever until the pipeline free some
space, this behavior is sufficient if the pipeline outputs are healthy.
But if the output stale the backpressure will be applied up to the input
(producers) when reading a file this scenario is fine since we will just
stop reading the file until the thread unblock again.

In the context of network clients, the story is a bit different the
clients will timeout and try to reconnect to restransmit their payload
creating multiple new connection thread block on the queue. In some case
this will lead into a OOM issues.

This PR is the first step to communicate that the queue is under
pressure.

Fixes #4408
2016-01-05 14:33:28 +00:00
Andrew Cholakian
4dcdc0eef7 Warn on potential memory issues when a large number of inflight messages are present
Fixes #4410
2016-01-04 19:14:14 +00:00
Suyog Rao
642b87bc37 First pass at creating 2.2 branch 2015-12-23 22:13:37 +05:30
Colin Surprenant
c5905119a4 fix to support legacy plugins specs monkeypatching pipelines 2015-12-21 17:10:14 -05:00
Andrew Cholakian
8de54e46ce NG Pipeline
Fixes #4363
2015-12-16 20:03:05 +00:00
Joao Duarte
c3c15aa81f move misplaced shutdown_controller after broken merge
Fixes #4268
2015-12-02 18:18:44 +00:00
Joao Duarte
21dfae1652 fix shutdown controller when using no filters 2015-11-27 10:48:19 +00:00
Joao Duarte
79b90b19d7 add shutdown controller to force exit on stalled shutdown
* start logstash with --allow-unsafe-shutdown to force_exit on stalled shutdown
* by default --allow-unsafe-shutdown is disabled
* stall detection kicks in when SIGTERM/SIGINT is received
* check if inflight event count isn't going down and if there are blocked/blocking plugin threads
2015-11-19 15:35:47 +00:00
Pere Urbon-Bayes
577d8377b8 This adds a feature to let users dump all their installed plugins,
including dependencies, and reuse them in an offline installation by
providing an package for it. It adds two important commands to the
plugin manager, the pack and upack, to handle package creation and
installation and adds the --local flag to install and update to pull
plugins from the installed local packages.

Former commits:

add a task to create a bundle, under vendor/cache of the installed gems + their dependencies, this can be used later on to be installed offline

add an option to pass the --local flag to the bin/plugin update task, so it fetch plugins from a local cache, by default under vendor/cache

rename package:build to package:build-cache as is more meaningfull

add a --local flag to bin/plugin install to users can install plugins from the local cache, under the default directory of vendor/cache

add a plugin manager command to build the local cache of installed plugins using bundler package alike command

It adds code for compressing and extracting in zip and tar formats to
the utils module of logstash. The zip module is only jruby dependant as
it uses functions provided by java.
There is also code add in the plugin manager package command to handle
compression of plugins dumping.

Cleanup the custom java code to compress and extract zip files as it has
been known that using rubyzip is good and it has a more ruby like
features so the code is more clean and portable.

set of smallish improvement requested during review

added several options to handle situation when the package of plugins we want to generate is already there

clean up old code

applyed feedback from review, mostly changed in documentating behaviour plus better wording for messages

relocate the Environment.windows? check to the bootstrap side as it's used also in the plugin manager

add an unpack bin/plugin command so users can install packages of plugins throw the plugin manager

document override behaviour in the compress helpers (for zip and tar) plus add a fix for the tar extract when reading entries

made the unpack filename parameter a required one

add a force option to the bin/plugin unpack command

add a notice to that if using a local cache the --local flag should be passed with

Code cleanup and refactor introduced during review

add two wording suggestions comming from review

ammend more wording

skip the major version validation as in situation where there is no internet connection like when using the local vendor/cache to do the update

move compress to the bootstrap environment as being used in the plugin manager means not being loaded with logstash-core

Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies

Revert "Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies"

This reverts commit a9d7f46649932b06efaafebdd0eed2b4c63c2235.

patch the Bundler::Source::Rubygems to fetch only gems from a remote  source

small changes in several parts of the plugin manager and the creation of a common pack command with shared code

change compress to read in chuncks

fix wrong var name in the bootstrap compress utils module

fix namespacing conflicts

add basic test for the compress utility module

ammend more namespace issues

add a comment to the rubygems mockey patch to rebuild the gem cache

apply cosmetic changes

make the compress module raise CompressError

remove vendor_path and pattern_path form environment as they where mix up during rebase

change the bin/pack force option to be force-delete-cache

rename force_delete_cache to overwrite

change force for overwrite in tha pack command

remove the override option for bin/plugin unpack

revert Gemfile and Genfile.lock wrong committed
2015-11-18 16:28:50 +01:00