log files can overflow and fill up file system

Bug #250776 reported by laga
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mythbuntu
Expired
Wishlist
Unassigned

Bug Description

Log files can grow very large [1], up to the point where they fill up / or /var with potentially disastrous results.

The MythTV packages use logrotate to rotate log files. While logrotate can rotate files based on their size, it is only run daily.

I suggest that mythtv-common should depend on a more sane log rotation utility. I'll try to find some alternatives.

[1] http://ubuntuforums.org/showpost.php?p=5432679&postcount=4

Related branches

laga (laga)
description: updated
Revision history for this message
laga (laga) wrote :

I haven't been able to find a nice log rotation tool. Any hints? :)

Changed in mythbuntu:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Thomas Mashos (tgm4883) wrote :

According to the logrotate manpage we can use a size restriction and it looks like we can use both a size and daily rotate. I've added this fix to the mythtv-fixes branch.

http://linuxcommand.org/man_pages/logrotate8.html

Changed in mythbuntu:
status: Confirmed → Fix Committed
Revision history for this message
laga (laga) wrote :

Thomas,

logrotate is run *daily*. And on every run, it will rotate the log file anyways. Adding a file size restriction won't gain us anything AFAICT.

I'm setting this bug back to triaged.

Changed in mythbuntu:
status: Fix Committed → Triaged
Revision history for this message
MarcRandolph (mrand) wrote :

At a minimum, all but the current log could be compressed. But otherwise, why is the current one not sane, and what would a "more sane" one do? Run every hour? Every minute? Every second? When there is a serious problem with the system, you're going to get serious logs! :-)

Revision history for this message
MarcRandolph (mrand) wrote :

The only sane thing I can think to do is to offer to put the /var/log directory on its own filesystem so that it doesn't take down the whole system if it overflows. Moving to wishlist. If anyone can think of something better, feel free to propose something - this obviously wouldn't help people that install Mythbuntu over a standard Ubuntu install.

Changed in mythbuntu:
importance: Medium → Wishlist
Revision history for this message
MarcRandolph (mrand) wrote :

Bug #407894 (closed as a dup of this) points out that the behavior after the above change is that logs do not rotate daily now... logrotate can only make use of either size or daily rotation, not both... and size takes priority.

I agree with that bug that daily log rotation is preferred.

Revision history for this message
Thomas Mashos (tgm4883) wrote :

We really do appreciate you opening this ticket to help improve Mythbuntu, but it needs to be closed for a number of reasons. The biggest one is that upstream has moved on to a new version and believes this to be fixed. Could you please verify if this issue still exists in the latest version?

Please do not let the closing of this ticket dissuade you from opening a new ticket if this (or any other) problem occurs with the newer versions.

Changed in mythbuntu:
status: Triaged → Expired
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.