maas.log on snapped version is not rotating

Bug #1966666 reported by Facundo Ciccioli
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned
3.4
Won't Fix
Medium
Unassigned

Bug Description

Running maas's snapped version 2.9.0~rc3-9131-g.26dc68728, we noticed an extremely large maas.log file (12Gb at /var/snap/maas/common/log/maas.log).

There's no entry on logrotate.d for such a file, but given what I read on [1] (pretty old) I don't believe that file should even exist. Snaps apparently should rely on the journal for logging purposes.

Found this lines on /var/snap/maas/10666/syslog/rsyslog.conf:

    if $syslogtag contains "maas" then {
      *.* /var/snap/maas/common/log/maas.log
    } else {

[1] https://forum.snapcraft.io/t/best-practice-for-logging/1210

Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

Replacing supervisord with real snap services, which would send all logs to journal and avoid this issue, is in the roadmap.

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → next
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

Improving MAAS log handling in snaps is a roadmap item, we'll mark this ticket as resolved once it's implemented (likely after 3.3). Afterwards, the operators will be able to configure log rotation themselves.

Changed in maas:
importance: High → Low
Changed in maas:
milestone: none → 3.4.0
importance: Low → Medium
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Revision history for this message
Jeff Lane  (bladernr) wrote :

Any love for this? Our own MAAS server has a snap and a maas log that is now over 1.5GB in size.

Changed in maas:
milestone: 3.4.x → 3.5.x
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.