Skip to content
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

in_tcp: in_udp: Add <parse> section checking. Fix #2266 #2267

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

cosmo0920
Copy link
Contributor

in_tcp and in_udp might raise the following error:

ArgumentError: parse: init is specified, but there're parameters without default values:@type
  /home/hhatake/GitHub/fluentd/lib/fluent/config/section.rb:178:in `block in generate'
  /home/hhatake/GitHub/fluentd/lib/fluent/config/section.rb:169:in `each'
  /home/hhatake/GitHub/fluentd/lib/fluent/config/section.rb:169:in `generate'
  /home/hhatake/GitHub/fluentd/lib/fluent/configurable.rb:94:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin/base.rb:57:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin_id.rb:39:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/log.rb:580:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin_helper/event_emitter.rb:73:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin_helper/extract.rb:78:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin_helper/parser.rb:83:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin_helper/server.rb:312:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin/in_tcp.rb:44:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/plugin.rb:164:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/root_agent.rb:282:in `add_source'
  /home/hhatake/GitHub/fluentd/lib/fluent/root_agent.rb:122:in `block in configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/root_agent.rb:118:in `each'
  /home/hhatake/GitHub/fluentd/lib/fluent/root_agent.rb:118:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/engine.rb:131:in `configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/engine.rb:96:in `run_configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/supervisor.rb:795:in `run_configure'
  /home/hhatake/GitHub/fluentd/lib/fluent/supervisor.rb:579:in `dry_run'
  /home/hhatake/GitHub/fluentd/lib/fluent/supervisor.rb:597:in `supervise'
  /home/hhatake/GitHub/fluentd/lib/fluent/supervisor.rb:502:in `run_supervisor'
  /home/hhatake/GitHub/fluentd/lib/fluent/command/fluentd.rb:310:in `<top (required)>'
  /home/hhatake/GitHub/fluentd/bin/fluentd:8:in `require'
  /home/hhatake/GitHub/fluentd/bin/fluentd:8:in `<top (required)>'
  /home/hhatake/GitHub/fluentd/vendor/bundle/ruby/2.4.0/bin/fluentd:22:in `load'
  /home/hhatake/GitHub/fluentd/vendor/bundle/ruby/2.4.0/bin/fluentd:22:in `<top (required)>'

But it is ambigious.
We should raise this error in each of the plugins, I guess.

Signed-off-by: Hiroshi Hatake hatake@clear-code.com

Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
@repeatedly
Copy link
Member

Looks good.
In the future, we should raise better message in config module, not each plugin.

@repeatedly repeatedly merged commit 162d20e into master Jan 18, 2019
@cosmo0920 cosmo0920 deleted the add-parse-section-checking-in-tcp-in-udp branch January 18, 2019 05:18
@cosmo0920
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants