Skip to content

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

Merged
kenhys merged 1 commit into
fluent:masterfrom
daipom:chumask-fix-issue-where-it-only-works-with-standalone-worker
Feb 26, 2025
Merged

chumask: fix issue where it only works with standalone worker#4836
kenhys merged 1 commit into
fluent:masterfrom
daipom:chumask-fix-issue-where-it-only-works-with-standalone-worker

Conversation

@daipom

@daipom daipom commented Feb 21, 2025

Copy link
Copy Markdown
Contributor

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

daipom commented Feb 21, 2025

Copy link
Copy Markdown
Contributor Author

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

@Watson1978 Watson1978 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍🏻

@kenhys kenhys left a comment

Copy link
Copy Markdown
Contributor

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
@daipom
daipom deleted the chumask-fix-issue-where-it-only-works-with-standalone-worker branch February 26, 2025 04:45
@daipom

daipom commented Feb 26, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for your review!

@kenhys

kenhys commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

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