Skip to content

chumask: fix issue where it only works with standalone worker #4836

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

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Feb 21, 2025

Which issue(s) this PR fixes:

What this PR does / why we need it:
Fix #3671 (88a7260)

After #3671, the value of chumask passed to ServerEngine was always nil.
The chumask value was being used only when standalone. It appears to be unintentional.

This fixes it.

  • By default, 0 as chumask is passed to ServerEngine.
  • If specifying --umask option, that value is passed.
  • This chumask value is applied when using daemonize.
    • When not using daemonize, the value is not used.
    • This is the specification of ServerEngine.

Specification change:
(Just undo the specification that #3671 unintentionally changed.)

  • This changes the default umask when using daemonize.
    • fluent-package (RPM/DEB), for example.
    • Before: system default (nil for ServerEngine)
    • After: 0

Docs Changes:
Not needed.
(There is not enough information on https://docs.fluentd.org/deployment/command-line-option. It would be good to add more information.)

Release Note:

  • Fixed a bug where the default umask was not set to 0 when using --daemon (td-agent, fluent-package) since v1.14.6.
  • --umask command line option: Fixed so that it is applied when Fluentd runs with --daemon (fluent-package) as well as when Fluentd runs with --no-supervisor.

Fix fluent#3671 (88a7260)

After fluent#3671, the value of `chumask` passed to ServerEngine was
always `nil`.
The `chumask` value was being used only when standalone.
It appears to be unintentional.

This fixes it.

* By default, `0` as `chumask` is passed to ServerEngine.
* If specifying `--umask` option, that value is passed.
* This `chumask` value is applied when using `daemonize`.
  * When not using `daemonize`, the value is not used.
  * This is the specification of ServerEngine.

Specification change:
(Just undo the specification that fluent#3671 unintentionally changed.)

* This changes the default `umask` when using `daemonize`.
  * fluent-package (RPM/DEB), for example.
  * Before: system default (`nil` for ServerEngine)
  * After: `0`

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

daipom commented Feb 21, 2025

It would be necessary for us to solve this issue before making the following enhancement:

Copy link
Contributor

@Watson1978 Watson1978 left a comment

Choose a reason for hiding this comment

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

👍🏻

Copy link
Contributor

@kenhys kenhys left a comment

Choose a reason for hiding this comment

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

LGTM.

@kenhys kenhys merged commit 69bdc91 into fluent:master Feb 26, 2025
9 of 10 checks passed
@daipom daipom deleted the chumask-fix-issue-where-it-only-works-with-standalone-worker branch February 26, 2025 04:45
@daipom
Copy link
Contributor Author

daipom commented Feb 26, 2025

Thanks for your review!

@kenhys
Copy link
Contributor

kenhys commented Apr 23, 2025

MEMO: will not backport to v1.16 because behavior is changed.

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.

4 participants