logrotate broken if the "log-archive" group doesn't exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Container Log Archive Charm |
Fix Released
|
High
|
Haw Loeung |
Bug Description
Hi,
The charm installs the following logrotate file :
/var/log/
rotate 7
daily
dateext
compress
notifempty
missingok
create 0664 root log-archive
}
The "log-archive" group is hardcoded. But on a lot of machines (e.g. cloud mirrors) it doesn't exist, so logrotate fails with :
/etc/cron.
error: container-
error: found error in /var/log/
and the file isn't rotated.
We know this group can possibly not exist on the machine as per https:/
Thanks !
Related branches
- Barry Price: Approve
- Canonical IS Reviewers: Pending requested
-
Diff: 69 lines (+10/-11)2 files modifiedhooks/hooks.py (+9/-7)
templates/logrotate.tmpl (+1/-4)
Changed in container-log-archive-charm: | |
status: | Confirmed → In Progress |
assignee: | nobody → Haw Loeung (hloeung) |
Changed in container-log-archive-charm: | |
status: | In Progress → Fix Committed |
Changed in container-log-archive-charm: | |
status: | Fix Committed → Fix Released |
Should be a matter of converting the logrotate file used to a template and then passing through the right group - 'log-archive' if it exists and 'root' if not (basically what Junien said).