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 system user/group name in logrotate config #592

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

rahulbpatil
Copy link
Contributor

Fix system user/group name in logrotate config

I had installed fluent-package - 5.0.1-1 on ubuntu 22.04

ii  fluent-package 5.0.1-1      amd64        All in one package of Fluentd

With fluent-package v5 user/group name is changed to _fluentd

However user/group name in logrotate config is fluentd, which causes following failure

$ logrotate -f /etc/logrotate.d/fluentd
error: /etc/logrotate.d/fluentd:7 unknown user 'fluentd'
error: found error in /var/log/fluent/fluentd.log , skipping

I guess this change was introduced in - #449

@daipom
Copy link
Contributor

daipom commented Oct 13, 2023

Thanks. We will confirm this.

Could you add DCO to the commit?
https://github.com/fluent/fluent-package-builder/pull/592/checks?check_run_id=17666702181

@daipom
Copy link
Contributor

daipom commented Oct 13, 2023

I have confirmed I can't logrotate by /etc/logrotate.d/fluent in fluent-package v5 for deb.
We need to fix this.
Thanks for the report, and sorry for the inconvenience.

I think we need some additional fixes.
In the rpm package, the user and group name are just fluentd, not _fluentd.
So, we need to fix this without breaking the rpm package.

@rahulbpatil
Copy link
Contributor Author

@kenhys kenhys added this to the 5.0.2 (T.B.D) milestone Oct 16, 2023
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. Thanks!

@kenhys kenhys merged commit bf66110 into fluent:master Oct 16, 2023
15 of 21 checks passed
@kenhys
Copy link
Contributor

kenhys commented Oct 16, 2023

It seems that some testing CI fails, but it should be fixed in another PR.

@daipom
Copy link
Contributor

daipom commented Oct 16, 2023

#592 (comment)

I think we need some additional fixes. In the rpm package, the user and group name are just fluentd, not _fluentd. So, we need to fix this without breaking the rpm package.

TODO: We need to fix this problem.

kenhys added a commit to kenhys/fluent-package-builder that referenced this pull request Oct 16, 2023
This reverts commit bf66110.

Note that fluent-package/templates/etc/logrotate.d/fluentd is
used for not only deb, but also rpm.
kenhys added a commit to kenhys/fluent-package-builder that referenced this pull request Oct 16, 2023
This is follow-up of fluent#592 to fix problem correctly.

fluent-package/tempaltes/etc/logrotate.d/fluentd is used
for deb and rpm, so it should support both of different
system user/group respectively.

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this pull request Oct 16, 2023
This reverts commit bf66110.

Note that fluent-package/templates/etc/logrotate.d/fluentd is
used for not only deb, but also rpm.

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this pull request Oct 16, 2023
This is follow-up of fluent#592 to fix problem correctly.

fluent-package/tempaltes/etc/logrotate.d/fluentd is used
for deb and rpm, so it should support both of different
system user/group respectively.

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this pull request Oct 16, 2023
This is follow-up of fluent#592 to fix problem correctly.

fluent-package/tempaltes/etc/logrotate.d/fluentd is used
for deb and rpm, so it should support both of different
system user/group respectively.

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit to kenhys/fluent-package-builder that referenced this pull request Oct 20, 2023
This is follow-up of fluent#592 to fix problem correctly.

fluent-package/tempaltes/etc/logrotate.d/fluentd is used
for deb and rpm, so it should support both of different
system user/group respectively.

Signed-off-by: Kentaro Hayashi <[email protected]>
daipom pushed a commit that referenced this pull request Nov 16, 2023
This is follow-up of #592 to fix problem correctly.

fluent-package/tempaltes/etc/logrotate.d/fluentd is used
for deb and rpm, so it should support both of different
system user/group respectively.

---------

Signed-off-by: Kentaro Hayashi <[email protected]>
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.

3 participants