The move to auto-scale output workers was great in theory, but a lot of outputs
just weren't built to support it well, they often used too many resources or had
logical errors.
Fixes#4905
We have decided to create a gem that the plugins can depend on to make
sure they use the correct core, with that in mind this will reduce the
mass update required when releasing a major release of logstash if the
contract between logstash and the plugin didnt change. The first version
of this gem act as a virtual gem, future release will include the actual
plugins code of the contract.
This gem should follow the same convention as semver, a breaking change
in the api will mean a bump in the major version. Plugins author are
encouraged to test their plugins with a specific version of the contract
and define their dependency as the following:
```
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
```
This PR also introduce rake task to help managing this gem, since every
release of logstash will produce a new version of this gem with the
minor version bump. A **logstash-core-plugin-api** will declare a strict
dependency on a specific **logstash-core** version, like this:
```
s.add_runtime_dependency "logstash-core", "2.3.0"
```
On the other hand each release of logtash will also declare a strict
dependency on a specific version of the `logstash-core-plugin-api` gem.
ref #4829Fixes#4881
ruby-maven ships a hidden directory called .mvn that
needs to be included in the package.
Currently the list of files to be packaged is generated using
Rake::FileList[globs] which excludes hidden files by default
(same happens with Dir.glob).
The fix is to ensure the contents of that directory are included
by explicitly referencing it.
For example, the file "extensions.xml", included in this directory,
is responsible for loading the ruby DSL for POMs. Not carrying this
file in the logstash package breaks any plugin update that uses
jar-dependencies.
Fixes#4845
return current time usec, not epoch usec, with millisec precision, because you know, Joda
correctly support BuigDecimal in Timestamp#at
specs for Timestamp#usec and Timestamp#at with all supported type
typo
more specs
In cases where $KILL_ON_STOP_TIMEOUT is undefined, getting to line 99 will generate the following error:
```
/etc/init.d/logstash: line 99: [: : integer expression expected
```
I'm no shell scripting expert, but from some tinkering I landed upon changing
```
if [ "$KILL_ON_STOP_TIMEOUT" -eq 1 ] ;
```
to
```
if [[ $KILL_ON_STOP_TIMEOUT -eq 1 ]] ;
```
which appears to work for me.
Also, logstash often takes longer than 5 seconds to shut down for me, so adding a few more seconds to the countdown on line 93 might help.
Might fix https://github.com/elastic/logstash/issues/4457Fixes#4732
This updates the specs to cover this expectation. It also makes
assertions about default values if a default `${FOO:default value}` is
given.
Specs pass for me (18 specs)
(Improves on #4710)
NOTE: this is a backport from master
* reload config from files
* add reload config flag and allow reload through sighup
* move signal handling to runner
* add "-r" flag to detect changes in config and reload
* make SIGHUP reload config file
* make agent execute either loop to detect changes or sleep forever
* sigint/sigterm shut down the agent.execute task
* stop agent if pipeline terminates
* Better shutdown logic for controller and pipeline
* support multiple pipeline reloading and other cleanups
* serialize upgrade_state and running_pipelines?
* remove useless @thread from pipeline
* remove agent registry and cleanup
* reduce reload_interval from 5 to 3
* remove useless MissingAgentError class
* fix exit codes for reload_state failures
* explain why thread var exists in agent.rb
* properly pass backtrace exceptions to oops
* remove is_config_test from loader
* better documentation on agent/runner/pipeline methods
Fixes#4643
No need to export all the JAVA* related environment variables
for configtest. It needs a minimal set of variables to execute
bin/logstash --config-test. This was indirectly causing issues
when used with JMX options in LS_JAVA_OPTS. JMX needs a remote port defined
and configtest was trying to connect to the port twice which caused
restart (#4319) to fail
Fixes#4319Fixes#4759
It should come before the `-f`, otherwise Logstash might bind a port and
start running, rather than only perform a configtest, then exit.
fixes 4737
Fixes#4738