Rotated logs are not compressed

Bug #1494661 reported by Jacek Nykis
70
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Tim Penhey
juju-core
Won't Fix
Critical
Unassigned
1.25
Won't Fix
Critical
Unassigned

Bug Description

I have multiple environments where juju rotates logs but never compresses or deletes them.

For example files like this are created:
machine-0-2015-08-23T23-51-25.014.log

And the stay there forever as far as I can see (at least long enough to trigger disk space alerts).

I saw this behaviour with juju 1.24.2-precise-amd64 and 1.24.5-precise-amd64.

Once rotated logs should be compressed to save disk space and also there should be sane retention policy in place. For amount of data juju logs I think weekly rotation with 2-3 months retention is good default.

Revision history for this message
Aaron Bentley (abentley) wrote :

This was supposed to have been fixed in 1.24beta3, so since it's being reported in 1.24.2+, the fix must be incomplete.
https://bugs.launchpad.net/juju-core/1.24/+bug/1452285

Revision history for this message
Aaron Bentley (abentley) wrote :

Oh, I see. Rotation is happening, but not compression or removal.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.25.1
JuanJo Ciarlante (jjo)
tags: added: canonical-bootstack
Changed in juju-core:
milestone: 1.25.1 → 1.26.0
no longer affects: juju-core/1.24
Changed in juju-core:
milestone: 1.26.0 → 2.0-beta5
Changed in juju-core:
milestone: 2.0-beta5 → 2.0-beta4
Changed in juju-core:
milestone: 2.0-beta4 → 2.1.0
affects: juju-core → juju
Changed in juju:
milestone: 2.1.0 → none
milestone: none → 2.1.0
Ryan Beisner (1chb1n)
tags: added: uosci
Revision history for this message
Anastasia (anastasia-macmood) wrote :

This is definitely not an issue for Juju 2.x

As for Juju 1.x... As this is not considered "Critical", I am marking it as 'Won't Fix".

Changed in juju-core:
status: New → Triaged
status: Triaged → Won't Fix
Changed in juju:
status: Triaged → Invalid
Changed in juju-core:
importance: Undecided → High
Changed in juju:
milestone: 2.1.0 → none
Revision history for this message
Jacek Nykis (jacekn) wrote :

Hi Anastasia,

Why do you think it's not an issue for Juju 2.x?

I can certainly see logs growing on my juju 2.0.1 controller. They are not compressed in any way:
/var/log/juju$ ls -lh logsink*
-rw------- 1 syslog syslog 300M Oct 11 07:15 logsink-2016-10-11T07-15-12.443.log
-rw------- 1 syslog syslog 300M Nov 9 08:24 logsink-2016-11-09T08-24-35.019.log
-rw------- 1 syslog syslog 287M Nov 22 09:36 logsink.log

Changed in juju:
status: Invalid → Confirmed
Revision history for this message
Ryan Beisner (1chb1n) wrote :

I have an existing, long-running 1.25.x deployment, which has a controller that fills the disk and subsequently falls over. To me, this is a critical issue.

Revision history for this message
Vance Morris (vmorris) wrote :

confirming, my longest running juju 2 controller is not compressing logs:

/var/log/juju$ ls -lah
total 702M
drwxr-xr-x 2 syslog adm 4.0K Nov 21 16:15 .
drwxrwxr-x 8 root syslog 4.0K Nov 22 06:25 ..
-rw------- 1 syslog syslog 0 Sep 23 21:20 audit.log
-rw------- 1 syslog syslog 300M Nov 19 00:25 logsink-2016-11-19T00-25-07.284.log
-rw------- 1 syslog syslog 300M Nov 21 16:15 logsink-2016-11-21T16-15-26.872.log
-rw------- 1 syslog syslog 100M Nov 22 13:26 logsink.log
-rw------- 1 syslog syslog 1.4M Oct 20 18:46 machine-0.log

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

The machine, unit and logsink log files are rotated at 300MB and the 2 most recent rotated copies of each are kept. This limits the maximum space for each log file and the rotated copies to 900MB.

We should look at compressing the rotated copies though.

FYI, the logsink files only exist on the controllers and contain the logs received by that particular API server from other agents. It exists as a last resort way of getting at logs in case the logs in mongodb aren't available.

Changed in juju:
status: Confirmed → Triaged
milestone: none → 2.2.0
Revision history for this message
Jacek Nykis (jacekn) wrote :

Also remember that any sane production environment will include subordinate services. In my case controller model has nrpe, ntp, livepatch, landscape and telegraf.

Every one of them creates log in /var/log/juju so if they use the same rotaion strategy it will be 5GB in total.

Changed in juju-core:
status: Won't Fix → Triaged
importance: High → Critical
Changed in juju-core:
milestone: none → 1.25.11
summary: - Old logs are not compressed or removed
+ Rotated logs are not compressed
Changed in juju-core:
milestone: 1.25.11 → none
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta1 → 2.2-beta2
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta2 → 2.2-beta3
Changed in juju:
milestone: 2.2-beta3 → 2.2-beta4
Changed in juju:
milestone: 2.2-beta4 → 2.2-rc1
Revision history for this message
Tom Haddon (mthaddon) wrote :

There's a PR to add support for this to lumberjack here https://github.com/natefinch/lumberjack/pull/43

Tim Penhey (thumper)
Changed in juju-core:
status: Triaged → Won't Fix
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Joel Sing (jsing)
Revision history for this message
Tim Penhey (thumper) wrote :
Changed in juju:
assignee: Joel Sing (jsing) → Tim Penhey (thumper)
Revision history for this message
Joel Sing (jsing) wrote :

Compression support has been merged into upstream lumberjack, so it should now just be a case of getting that pulled into Juju deps and enabled via config.

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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