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

Fix problem that some system configs are not reflected #4064

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Feb 19, 2023

Which issue(s) this PR fixes:
I found this problem during fixing:

I thought this should be fixed in a separate PR, so I made this PR first.

What this PR does / why we need it:
Options explicitly specified in command line should be preferred to options specified in system config.

However, options that have a default value, such as suppress_repeated_stacktrace, are preferred even when they are not specified in the command line.

Because of this, the following setting is not reflected.

<system>
  suppress_repeated_stacktrace false
</system>

Options explicitly specified in command line should be preferred to options specified in system config.

In order to realize this specification, we should pass only options that are explicitly specified in the command line to Superviser.new().

Docs Changes:
Not needed.

Release Note:
Same as the title.

This PR allows suppress_repeated_stacktrace from SystemConfig to be reflected to the supervisor correctly, but we still have the problem that it is not reflected to the workers.
It will be fixed at

Options explicitly specified in command line should be
preferred to options specified in system config.

However, options that have a default value, such as
`suppress_repeated_stacktrace`, are preferred even when they are
not specified in the command line.

Because of this, the following setting is not be reflected.

```
<system>
  suppress_repeated_stacktrace false
</system>
```

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
lib/fluent/command/fluentd.rb Outdated Show resolved Hide resolved
@daipom
Copy link
Contributor Author

daipom commented Feb 20, 2023

https://github.com/fluent/fluentd/pull/4064/files#diff-6042a07157b33b2d729ab3d10ed6bba89ad5f71aaed2be1aeb22a179a45ebbaeR1107-R1111

We can discard this logic now, and we should have the corresponding test here too,

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
This priority problem is fixed fundamentally, so we don't need
this logic now.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
@daipom
Copy link
Contributor Author

daipom commented Feb 20, 2023

https://github.com/fluent/fluentd/pull/4064/files#diff-6042a07157b33b2d729ab3d10ed6bba89ad5f71aaed2be1aeb22a179a45ebbaeR1107-R1111

We can discard this logic now, and we should have the corresponding test here too,

Fixed.

@ashie ashie added this to the v1.16.0 milestone Mar 3, 2023
Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashie ashie merged commit 8e9f46a into fluent:master Mar 3, 2023
@ashie
Copy link
Member

ashie commented Mar 3, 2023

Sorry for the delay, I missed the additional fixes...

@daipom daipom deleted the fix-override-systemconfig branch March 3, 2023 04:00
@daipom
Copy link
Contributor Author

daipom commented Mar 3, 2023

Thanks for your review!

daipom added a commit to daipom/fluentd that referenced this pull request Mar 12, 2023
Fix bug of:

* fluent#4064
* 8e9f46a

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
end
return unless b
cur_level = cmd_opts.fetch(:log_level, default_opts[:log_level])
cmd_opts[:log_level] = [cur_level + 1, Fluent::Log::LEVEL_TRACE].max
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I overlooked it...
#4090

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my simple mistake.

daipom added a commit to daipom/fluentd that referenced this pull request Aug 19, 2024
This option is explained as "add plugin directory".
However, since v1.16.0, the behavior has changed to overwrite the
default value unintentionally.
(PR: fluent#4064, commit: 41678bf).

We should revert it to the original behavior.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
daipom added a commit to daipom/fluentd that referenced this pull request Aug 19, 2024
This option is explained as "add plugin directory".
However, since v1.16.0, the behavior has changed to overwrite the
default value unintentionally.
(PR: fluent#4064, commit: 41678bf).

We should revert it to the original behavior.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
daipom added a commit that referenced this pull request Aug 20, 2024
Backported from fe5843f

---

This option is explained as "add plugin directory".
However, since v1.16.0, the behavior has changed to overwrite the
default value unintentionally.
(PR: #4064, commit: 41678bf).

We should revert it to the original behavior.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
daipom added a commit that referenced this pull request Aug 20, 2024
Backported from fe5843f

---

This option is explained as "add plugin directory".
However, since v1.16.0, the behavior has changed to overwrite the
default value unintentionally.
(PR: #4064, commit: 41678bf).

We should revert it to the original behavior.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
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