Allow logrotate configuration via juju config

Bug #1673011 reported by Barry Price
16
This bug affects 3 people
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.d/haproxy, with the following contents (from the Xenial version of the package):

http://pastebin.ubuntu.com/24181688/

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.

Tom Haddon (mthaddon)
Changed in charm-haproxy:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Daniel Manrique (roadmr) wrote :

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.

Changed in charm-haproxy:
assignee: nobody → Thomas Cuthbert (tcuthbert)
Revision history for this message
Thomas Cuthbert (tcuthbert) wrote :
Changed in charm-haproxy:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.