Skip to content

Commit

Permalink
Fix system user/group name in logrotate config (#592)
Browse files Browse the repository at this point in the history
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`
-
https://github.com/fluent/fluent-package-builder/blob/v5.0.1/fluent-package/templates/package-scripts/fluent-package/deb/postinst#L13
-
https://github.com/fluent/fluent-package-builder/blob/v5.0.1/fluent-package/templates/package-scripts/fluent-package/deb/postinst#L19

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

Signed-off-by: Rahul Patil <[email protected]>
  • Loading branch information
rahulbpatil authored Oct 16, 2023
1 parent b4b7017 commit bf66110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fluent-package/templates/etc/logrotate.d/fluentd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
compress
delaycompress
notifempty
create 640 <%= service_name %> <%= service_name %>
create 640 _<%= service_name %> _<%= service_name %>
sharedscripts
postrotate
pid=/var/run/<%= package_dir %>/<%= service_name %>.pid
Expand Down

0 comments on commit bf66110

Please sign in to comment.