Commit graph

870 commits

Author SHA1 Message Date
Dan Hermann
891e88edb9 back-port #9764
Fixes #9825
2018-07-11 16:34:31 +00:00
Andrew Cholakian
a425a422e0 Use v1.1 of java code format
Fixes #9358
2018-04-11 07:26:35 -05:00
Armin
0ebe7a4bec #9167: Serialize RubyString as Java String UTF-16 encoded
Fixes #9307
2018-04-11 03:59:42 +00:00
Ry Biesemeyer
f639a7942a reference properly-namespaced ConfigurationError when failing
Previous code was failing to resolve ConfigurationError at runtime,
because there is no ConfigurationError on the lexical scope or included
into the LSCL AST.

Instead of emitting the helpful error intended, it blew up with a
NameError that adds noise to the problem instead of being helpful as
intended.

Fixes #9343
2018-04-10 21:48:12 +00:00
Joao Duarte
27db6f5b1c fix typo in pipeline startup message
Fixes #9330
2018-04-05 15:28:44 +00:00
Armin
ff9114927d #9247 and #9281: Fix incorrect serialization offsets RubyString
Fixes #9308

Fixes #9318
2018-04-03 09:07:44 +00:00
Andrew Cholakian
51ba82a1c6 Ensure that metadata keys are valuefied
It was previously the case that setting metadata might not convert values set to metadata.
This could cause type errors.

Fixes https://github.com/elastic/logstash/issues/9295

Fixes #9299
2018-03-28 14:32:08 +00:00
Andrew Cholakian
eac230f122 Fix race condition in shutdown of pipelines
Prior to this a single worker could slurp down multiple shutdown messages, this prevents that from happening by using a flag that can't be overconsumed.

Fixes #9285
2018-03-26 21:59:18 +00:00
Andrew Cholakian
70549de1a7 Improve performance of Event#cancel
This method was creating a ton of expensive objects making execution slow.

In local tests this improved performance massively, at least 5x in one test with the drop filter.

Fixes #9284
2018-03-26 15:11:14 +00:00
Armin
93fd4cfa86 #9024 BUG: Memory Queue needs to always be drained
Fixes #9037
2018-01-25 21:56:24 +00:00
Jake Landis
ef9541463b Test Fix: Ensure the notLogstashKeystore assertion will pass when the last byte of a radom byte file is zero Fixes #9031
Fixes #9034
2018-01-25 18:36:28 +00:00
Jake Landis
51eca7c701 Keystore: Change default permission to 644
When Logstash is package installed (rpm/deb), the cli tool will be installed with root/root, but the service is run as logstash/logstash.  Changing to allow global read access to allow the logstash user read the keystore. Documentation will be provided for how to setup the keystore password such that you will need root access to obtain the keystore password, thereby requiring root access to do anything with the keystore as long as the password is set.

Part of #8735

Fixes #9006
2018-01-24 16:43:37 +00:00
Armin
d4821dd398 MINOR: Remove unnecessary logger fields from output delegator strategy and plugin factory
Fixes #8964
2018-01-17 11:38:07 +00:00
Armin
6d1dd96847 JAVAFICATION: Move remaining Logstash::Timestamp Ruby Code to Java
Fixes #8969
2018-01-17 11:27:15 +00:00
Armin
5c32868be8 JAVAFICATION: Move in memory queue read batch to Java
Fixes #8956
2018-01-17 09:27:34 +00:00
Armin
33ece13ef2 MINOR: Remove unnecessary logger fields from filter and output delegators
Fixes #8957
2018-01-16 22:02:48 +00:00
Armin
fb88131b73 CONFIG COMPILER: Logging to local source files
This reverts commit e5f359367f.

Fixes #8913
2018-01-16 16:48:23 +00:00
Armin
7d26b4c6b8 MINOR: Simplify Java entrypoint
Fixes #8954
2018-01-16 16:39:12 +00:00
Jake Landis
8cfdee9832 Secretstore windows fixes.
* Can't create file with POSIX flags, since not all Windows are POSIX
* Can't explicitly lock the underlying file on Windows, since the
keystore already implicity (implementation detail) locks and does not
allow any interactions if locked.  This is very similar to the *nix
behavior, except on *nix you can read while locked and need to manually
manage the lock.

Fixes #8938
2018-01-15 16:27:12 +00:00
Armin
ee7776ac0e BUG: Fix exceptions that aren't system exit type to be swallowed
Fixes #8940
2018-01-15 16:17:25 +00:00
Armin
d0d3b9f3af MINOR: Fixed Iteration Order per Batch Worker Thread
Fixes #8928
2018-01-13 12:18:30 +00:00
Jake Landis
233b805a82 Secret Store: Ability to set and use secret data from an encrypted data store.
Fixes #8657

Part 1: API and JavaKeyStore implementation (#8657)

Introduces the API to read/write/delete sensitive data from a secure store and includes a Java KeyStore implementation. Note - this commit does NOT integrate with the Logstash configuration or settings.

Part 2: Secret Store: SecretStoreFactory, SecureConfig, Obfuscation and X-JVM support (#8659)

*  Secret Store: SecretStoreFactory, SecureConfig, Obfuscation and X-JVM support

* Introduce a SecretStoreFactory to allow runtime definition of SecretStore implementation.
* Introduce a SecureConfig to allow simple configuration of different SecretStore implementaiton.
* Introduce random default password plus obfuscation. Best attempt at security through obscurity.
* Corrections / better support for x-JVM modification.

Part 3: Secret Store: SecretStore, SecretStoreFactory, JavaKeystore - refacactor (#8745)

* Adds more CRUD like operations for SecretStore API
* SecretStoreFactory Mirror API's CRUD operations
* Adds 'exists' to API to allow command line warning 'Overwrite ?'
* Minor readabiliy

Part 4: Integrate secret store with Logstash core (#8905)

This change introduces the command line tooling and hooks needed to allow Logstash to use the secret store. This change hooks into the same logic that the does the environment variable substitution. The commnad line mirrors the Elasticsearch command line, and is implemented primarily in Java.

Part 5: Hardening and test fixes (this PR)

Fixes #8935
2018-01-13 01:24:33 +00:00
Colin Surprenant
3241048c94 correctly handle paths with spaces #8931 2018-01-11 13:30:38 -05:00
Armin
a84846d293 #8619 Fix periodic flusher in Java exec + spec
Fixes #8629
2018-01-05 17:49:27 +00:00
Armin
7fd42f6a93 MINOR: Move test specific ruby classloading hack to test code
Fixes #8910
2018-01-04 17:37:26 +00:00
Armin
462ba9001a MINOR: Remove pointless method form compiledPipeline
Fixes #8911
2018-01-04 17:35:45 +00:00
Armin
dff953d881 JAVA EntryPoint
* Created `org.logstash.Logstash` as entrypoint
* Safely handle `Ruby` runtime (which sadly is still a singleton, moving away from that will require a few iterations on top of this)
* Adjusted `bat` and `sh` entry point wrappers
* Verified manually that performance is unchanged (i.e. all Java opts are still loaded properly)
* Flattened `.jar` path to make it a little less bothersome to build the `-cp` string
* Retained ability to load jars from Ruby via the global `$LS_JARS_LOADED` variable hack, to keep plugin specs that load LS as a `.gem` functional (like e.g. the ITs in LS itself)
* No need for the gem jars magic anymore, the downloading and moving into place of jars is now all handled by Gradle

Fixes #8161
2018-01-03 19:13:28 +00:00
Armin
23702614d2 PERFORMANCE: Fix unnecessary charSequence length calls in Fieldreference#from
Fixes #8897
2017-12-29 14:45:36 +00:00
Armin
1fd0c32829 #8888 Fix RubyTimestamp clone method
Fixes #8889
2017-12-28 11:53:48 +00:00
Armin
f5aaf8a93e #8883 Fix concurrent modification issue on RubyArray in mock output
Fixes #8884
2017-12-26 10:07:15 +00:00
Jake Landis
63fffc2d64 Add Logstash config source as comments to generated code
This change is purely to help enable debugging purposes by logging the config source (as writting in the configuration) to generated class relationship.  It is logged to appear as comments to the generated code.

Fixes #8691
2017-12-22 18:18:57 +00:00
Jake Landis
91b348cbf7 Dataset compiler: add pretty print generated source output
Fixes #8691
2017-12-22 18:18:57 +00:00
Armin
9fe13d1e60 Config Compiler Enhancement
* Compile conditional datasets
* Correctly typecast Dataset implementations in generated code using a custom ClassLoader
* Optimize away redundant calls to get the current Ruby thread context
* Make field naming and typing in generated code automatic
* Modularize code a lot more
* Fix and spec for #8757
   * Fixed by caching the result of a filter Dataset correctly, it was missing the boolean flag that triggered just returning the internal cache

Fixes #8691
2017-12-22 18:18:57 +00:00
Jordan Sissel
89a4dbb842 Add tool to generate dependency details in csv
Fixes #8725

Rough goal is to present license information for all dependencies

Fixes #8881
2017-12-22 16:54:29 +00:00
Shaunak Kashyap
40bc87c6e3 Allow users to specify --pipeline.id from the CLI
This will allow users to override the pipeline id from the default, "main", to something else while running pipelines via either the -e or -f options.

Fixes #8868
2017-12-20 20:17:37 +00:00
Andrew Cholakian
8e7fb93d16 Simple vertex hashing
Fixes #8836

Fixes #8863
2017-12-20 02:19:40 +00:00
Andrew Cholakian
f5730da284 Validate deprecated/obsolete options after sanitization
The old order made no sense since Password / SafeURI objects were not wrapped in their to_s suppressing containers.

Only remove the obsolete params after they've been detected

Fixes #8785
2017-12-12 14:23:21 +00:00
Joao Duarte
a646367783 fix require of manticore to avoid warnings at startup
Fixes #8835
2017-12-12 13:52:04 +00:00
Joao Duarte
f657b86c71 several improvements to logging messaging and ordering
* remove unused close_pipelines agent code

Fixes #7956
2017-12-12 13:08:10 +00:00
Jake Landis
7fddc4a5de LIR: merge arrays of divergent types
Specifically this change explictly checks for the Array type to merge into and pushes into the array instead of relying only on the + concat.

Fixes #8827

Fixes #8831
2017-12-11 23:33:10 +00:00
Jake Landis
cdb4f0ca74 fix ArrayIndexOutOfBoundsException from empty String field reference
fixes #8823

Fixes #8824
2017-12-11 19:32:16 +00:00
Colin Surprenant
078f9f11b0 change batch delay to 50ms and page size to 64mb
a 50ms delay helps creating more full batches without practical added latency see #8707
a 64mb page helps PQ perfmance related to a large page size see #8702 #8707
2017-12-05 13:59:14 -05:00
Colin Surprenant
1716c5d501 maximize PQ read bach size by using same read timeout semantic as MQ #8702
add from another LongVector

use timedout read batch and added test for maximization

WIP maximized batch read size

fixes and cleanups

cleanups

use the await returned boolean to assess timeout

remove useless constant

use Callable<Void> and cosmetic fix
2017-12-05 13:45:35 -05:00
Armin
c61abd388c MINOR: Bring log4j version in line with ES
Fixes #8793
2017-12-04 15:45:25 +00:00
Dan Hermann
9ff894ff06 Support setting logging back to defaults via the API.
Fixes #8384

Fixes #8786
2017-12-01 23:09:05 +00:00
Allen Shi
91e281729c Unknown garbage collector name #8782
https://github.com/elastic/logstash/issues/8782

Fixes #8784
2017-12-01 17:09:31 +00:00
Allen Shi
0dc5691a7f (8782) Unknown garbage collector name
Fix this https://github.com/elastic/logstash/issues/8782

Fixes #8784
2017-12-01 17:09:30 +00:00
Colin Surprenant
5315735cf7 cleanup & DRY Queue open(), addIO() and addPage() 2017-12-01 11:47:54 -05:00
Armin
76e6b1ae5a #8755 throw more readable exception on config parse failure
Fixes #8774
2017-12-01 08:51:00 +00:00
Colin Surprenant
06f4474e79 fix queue open bug for fully acked in-between pages plus new test 2017-11-30 12:03:24 -05:00