-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
-p overwrites the default plugin path #4269
Comments
Thank you for feedback. Currently, it seems that actually overrides default plugin directory (reset) and it seems intended behavior. https://github.com/fluent/fluentd/blob/master/lib/fluent/supervisor.rb#L512 As you mentioned, specify both of your specific directory and default plugin directory works. |
Thanks for your reply @kenhys While I get that this is intended behaviour now, the problem is that this is a behavioural change that was not documented. I think it would have make sense to highlight this as a breaking change in the release notes.
|
Hmm, breaking change is not desirable, it seems that expecting not overriding default path is reasonable. 🤔 |
I'm sorry. This should be fixed. |
Hi @daipom , i was looking at this issue to see what could be the fix. There are 2 hash that is used, default_opts is used for storing the default configuration, while cmd_opts is used to store user provided command line options. Later these 2 hashes are merged using the merge function . As a result of this merge function, the plugin_dirs key value available in default_opts is overwritten by the value in cmd_opts. If the old behaviour has to be continued, then values of the key(plugin_dirs) in the 2 hashes should have been concatenated instead of overwriting. The fix which i could think of is using concat function to join the content of plugin_dirs key array values after the 2 hashes are merged at line
Please let me know if this looks ok or is there a better option. Thanks, |
@daipom, can you please let me know if the approach looks ok or is there any other suggestion for the fix. Based on this i can raise a PR. Thanks, |
@mrudrego Thanks! Sorry for my late response. The fix for this issue would be difficult. Actually, it's not fluentd/lib/fluent/command/fluentd.rb Lines 350 to 359 in 52e46f0
It is merged here. 😢 fluentd/lib/fluent/supervisor.rb Lines 510 to 541 in 52e46f0
So, I think this fix is very difficult. It would require knowledge of the entire Fluentd startup logic. I don't think this fix will be done in time for the next release v1.16.3. Of course, if you have any good ideas, please let us know! Thanks! |
Fixed by #4605. |
Describe the bug
When updating from
fluent/fluentd-kubernetes-daemonset:v1.14.6-debian-logzio-amd64-1.0
tofluent/fluentd-kubernetes-daemonset:v1.16.2-debian-logzio-amd64-1.0
our setup stopped working.During investigation it turned out that plugins in the default plugin directory (
/etc/fluent/plugin/
) are not processed anymore when using the-p
parameter.To Reproduce
Add custom pluins into
/etc/fluent/plugin/
directory and ensure that they are used by the config:When starting fluentd with the default options from the Dockerfile command (
fluentd -c /test/fluentd.conf -p /fluentd/plugins/ --gemfile /fluentd/Gemfile
) I am getting this error:I can get rid of this error by either not specifying
-p
at all:or by adding the default plugin explicitly:
Expected behavior
The
-p
parameter should add plugin directories as documented without unsetting the default directory.Your Environment
Your Configuration
/fluentd/etc/conf.d/01-pre-parsing-filters.conf:
The text was updated successfully, but these errors were encountered: