-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated deprecation setting error on main after #15679 #16505
Comments
This problem raises from the fact the Agent cyclically (if autoreload is enabled) reload and resolve pipeline configuration, in checking if Settings instances has changed, it invokes the In more details: logstash/logstash-core/lib/logstash/agent.rb Line 132 in e84fb45
logstash/logstash-core/lib/logstash/agent.rb Line 192 in e84fb45
logstash/logstash-core/lib/logstash/agent.rb Line 339 in e84fb45
logstash/logstash-core/lib/logstash/agent.rb Line 421 in e84fb45
logstash/logstash-core/lib/logstash/settings.rb Lines 226 to 229 in e84fb45
In checking equality of hash map both keys and values of hash maps are accessed. The map (due to the |
The motivation of access the logstash/logstash-core/lib/logstash/settings.rb Lines 154 to 161 in e84fb45
|
) Update Settings to_hash method to also skip Java DeprecatedAlias and not just the Ruby one. With PR #15679 was introduced org.logstash.settings.DeprecatedAlias which mirrors the behaviour of Ruby class Setting::DeprecatedAlias. The equality check at Logstash::Settings, as descibed in #16505 (comment), is implemented comparing the maps. The conversion of Settings to the corresponding maps filtered out the Ruby implementation of DeprecatedAlias but not the Java one. This PR adds also the Java one to the list of filter.
) Update Settings to_hash method to also skip Java DeprecatedAlias and not just the Ruby one. With PR #15679 was introduced org.logstash.settings.DeprecatedAlias which mirrors the behaviour of Ruby class Setting::DeprecatedAlias. The equality check at Logstash::Settings, as descibed in #16505 (comment), is implemented comparing the maps. The conversion of Settings to the corresponding maps filtered out the Ruby implementation of DeprecatedAlias but not the Java one. This PR adds also the Java one to the list of filter. (cherry picked from commit 5d4825f)
… other than Ruby's one Update Settings to_hash method to also skip Java DeprecatedAlias and not just the Ruby one. With PR #15679 was introduced org.logstash.settings.DeprecatedAlias which mirrors the behaviour of Ruby class Setting::DeprecatedAlias. The equality check at Logstash::Settings, as descibed in #16505 (comment), is implemented comparing the maps. The conversion of Settings to the corresponding maps filtered out the Ruby implementation of DeprecatedAlias but not the Java one. This PR adds also the Java one to the list of filter. (cherry picked from commit 5d4825f) Co-authored-by: Andrea Selva <[email protected]>
Description of the problem including expected versus actual behavior:
After merge of PR #15679 which introduced new Java classes for base, aliased and Boolean setting translating from Ruby existing code, if Logstash runs with the reload of a pipeline flag (both as command line
--config.reload.automatic
or configuring it inconfig/logstash.yml
, it starts repeating the following error log:This happens only when the pipeline is configured in
config/pipelines.yml
, both asconfig.string
or with pathpath.config
.Instead, it doesn't happen when running directly the pipeline form the file with
logstash -f simple_pipeline.conf
Steps to reproduce:
Please include a minimal but complete recreation of the problem,
including (e.g.) pipeline definition(s), settings, locale, etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.
config/pipelines.yml
addingIf the reload it's not enabled, it doesn't happen.
Also note that it happend every 3 seconds (the default value of
config.reload.interval
) and appears always twiceProvide logs (if relevant):
The text was updated successfully, but these errors were encountered: