logstash-plugins / logstash-output-elasticsearch

https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html
Apache License 2.0
216 stars 306 forks source link

shut down pipeline when finish register fails #1151

Closed kaisecheng closed 8 months ago

kaisecheng commented 10 months ago

Prior to this change, the errors in the post-register phase (finish_register) behaved differently: template manager logged failure; ILM setup loop printed error messages. Continuing the pipeline would not be meaningful.

With this commit, ConfigurationError is introduced for critical bootstrap failures, such as when the template path is not found. This change stops the pipeline when it gets ConfigurationError or 4xx status code calling template or ILM related API. For HTTP 429 too many request, finish_register retries the bootstrap

kaisecheng commented 9 months ago

It would be better to add integration test in core rather than in plugin to test pipeline shutdown.

Test against Logstash 6 fails. Believe we can stop testing 6.x

public_suffix-5.0.3 requires ruby version >= 2.6, which is incompatible with the current version, ruby 2.5.3p0 (jruby 9.2.7.0)