Allow logrotate configuration via juju config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-haproxy |
Fix Released
|
Medium
|
Thomas Cuthbert |
Bug Description
The charm installs the regular packaged version of haproxy, which will install a file named /etc/logrotate.
http://
So by default the logs are rotated weekly, leaving up to a week's worth of uncompressed logging on the units, along with a year's worth of compressed logs.
In high-traffic environments, this configuration can fill the units root partition quite quickly.
It would be useful if the charm offered logrotate options via juju config to better control at least the rotation frequency, and number of logs to keep.
It may also be desirable to be able to set/unset options like delaycompress, and perhaps an option to use alternatives to gzip, e.g. bzip2/xz/etc.
Changed in charm-haproxy: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in charm-haproxy: | |
assignee: | nobody → Thomas Cuthbert (tcuthbert) |
Changed in charm-haproxy: | |
status: | Confirmed → Fix Released |
Oh hahaha - the posted config file from the deb package has a semantic inconsistency.
daily
rotate 52
This rotates *daily* and keeps 52 logs (one uncompressed, the rest compressed). But as commented by the reporter, the intent was to rotate *weekly* (52 days makes no sense, 52 weeks does).
This problem would have to be ultimately fixed in the haproxy .deb package, but can be mitigated if juju config can be used to override the package's logrotate settings.