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
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#8827Fixes#8831
A regression was introduced in the new LSCL/LIR implementation in 6.0, in
which configurations that had nested hashes produced valid treetop-ASTs that
could not produce a valid LIR; the values in an `LSCL::AST::Hash` were
assumed to implement `ValueExpression`, but `LSCL::AST::Hash#expr` produced
an unwrapped `RubyHash`.
By making `LSCL::AST::Hash#expr` emit a `ValueExpression` _representing_ a
`RubyHash`, and relying on the existing code that deals with `ValueExpression`
appropriately, we can re-enable deeply-nested hashes in configs.
As more java code is being used in logstash, it's likely that
java.lang.Threads which aren't set as daemon may be running when
`exit(1)` is called.
Because System.exit only raises a SystemExit exception, it's possible
that threads will continue to execute, and if they're not set as daemon
then the JVM won't terminate.
By calling `System.exit!` instead we ensure jruby calls the underlying
java.lang.System.exit and logstash terminates immediately.
Fixes#8729
A [build failure][] of the grok plugin when run through LIR/lscl indicates that
there is an expectation for multiple Attributes of the same name to be merged
together.
This commit ports the failing spec in the plugin to an abstraction that can be
tested within logstash-core, and adds a caveat to the LSCL LIR-builder to
ensure that we merge the hashes in a way that is compatible with legacy
behaviour.
NOTE: when multiple Attributes of the same name are used in a single config,
it's possible to create configurations that circumvent `AST::Hash`'s ability to
report duplicate keys.
[build failure]: 293778268
Backports #8597Fixes#8602
If modules configuration has elasticsearch credentials set, but not
kibana, attempt to use elasticsearch credentials for Kibana login.
Fixes#8422Fixes#8482
When X-Pack is installed an internal (hidden) pipeline named .monitoring-logstash is also running. This means that for X-Pack is there N +1 pipelines where N = user defined pipelines. The code currently only supports monitoring 1 pipeline, and it is possible that the internal pipeline gets picked up instead of the intended pipeline.
When multiple user pipelines are enabled (6.0+), the code still only supports monitoring 1 pipeline.
The change here is to ignore the system pipelines, and monitor as many user defined pipelines that may exist.
Fixes: #8382Fixes#8472
final (I hope) fixes for consolidated versioning.
After testing with rake artifact:zip, need to try both files.
Add desc to rake test:install-* tasks, tired of
not seeing them in rake -vT
changes requested via review
Fixes#8373Fixes#8389
Password settings for Modules supplied via a yml file were being wrapped inside a
LogStash::Utils::Password object twice during startup - once in from_yaml, and once
in validate. Disallow this from happening by skipping the wrap if the password is
already wrapped
This should complete the fix for #8224Fixes#8258
Previously users had to enable --log.level=debug to see backtraces. These errors catch everything which can make debugging based on user reports difficult if not impossible.
Enabling --log.level=debug to solve these issues is not useful because users cannot enable it in production for rare errors.
Fixes#8156
use rm_rf to delete dir and shutdown pipeline after run
avoid the use of rescue nil, bad practice
do not mock close as it prevents closing the file an prevents removing it on Windows
cleanup temporary files and relax file name check for Windows
fix paths handling for Windows
flag the read file string as UTF-8 which is what we expect
fix Windows issues
ignore load_average on windows
windows safe URI
cleanup and fix file handling for windows
wait for pipeline shutdown to complete
revert to original puts
cleanups
use environment for windows platform check
fix hash path
wait for pipeline thread to complete after shutdown
* add newlines to generated json
* Implement cloud.id and cloud.auth settings merge to module settings
* Fixes from review plus convert to using Password for any Module Setting
* Review changes
* update modules.asciidoc to include a section on Cloud
* Capitalize Id
* remove unnecessesary require lines
This commit broke the plugin contract with plugins like xpack and caused many issues there. Reverted until it can be better handled.
This reverts commit 92cdbe2dbd.
Fixes#7995
* Add --setup phase for modules
Without the `--setup` flag, the index template for elasticsearch, and the index-pattern, saved searches, visualizations, and dashboards for Kibana will not be published.
fixes#7959
In this patch we unify the IDs reported by LIR with those generated using config_ast.rb
This is a temporary fix until LIR execution is built. It relies on the fact that currently both LIR and config_ast.rb only operate on a single concatenated string of configurations. In the future LIR will compile different files separately, then merge their IRs. For now, however, this solution will hold.
This change also exposes the :id attribute of FilterDelegator to bring it to parity with OutputDelegator and InputDelegator which is required for testing purposes.
Fixes#7930
if force shutdown uses `with_pipelines` then it will never acquire the
`@pipelines_lock` from `shutdown_pipelines` until it terminates.
This PR makes force shutdown use `@pipelines` directly, fixing it.
Fixes#7918
Fix bug where reloading a pipeline would close the DLQWriter, but
leave the closed version cached in the factory object, stopping
the reloaded pipeline from being able to write to the dead letter
queue.
Fixes#7840
- allow empty config.string
- move all config autocompletion logic to the ConfigStringLoader
- gracefully handle absense of files in path.config
- ensure original_settings are restored in multi_local source after PipelineConfig creation
Fixes#7866