fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 23 forks source link

Fix system user/group name in logrotate config #592

Closed rahulbpatil closed 9 months ago

rahulbpatil commented 9 months ago

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 - https://github.com/fluent/fluent-package-builder/pull/449

daipom commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

Added DCO with https://github.com/fluent/fluent-package-builder/pull/592/commits/b5503d1d37497fdfaa3c59b2c388cac8f573d334

kenhys commented 9 months ago

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

daipom commented 9 months ago

https://github.com/fluent/fluent-package-builder/pull/592#issuecomment-1761019009

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.