Bug#585847: [Pkg-icecast-devel] Bug#585847: logrotate script does not rotate archived log files

Marcus Bointon marcus at synchromedia.co.uk
Sun Jan 26 23:50:37 UTC 2014


I've just run into this. It's actually quite a serious bug that causes data loss, and the original description is not quite accurate.

The bug is in the debian packaging of icecast, not icecast itself.

In icecast's config, logarchive is off by default and the default logsize value is 10Mb, so icecast will not fill up the disk - at worst it will write two 10Mb files (access.log and access.log.old) - a very basic form of log rotation.

The problem is that logrotate is doing the same thing in a pattern that this conflicts with. When logrotate is run for icecast, it archives the main log file only (as the original report pointed out). If the log file never reaches 10Mb between logrotate runs, then no data loss occurs. If over that but under 20Mb of data is written, it will lose the overflow data 1 month later. Beyond 20Mb, all log data is lost.

An appropriate solution for this would be to prevent icecast from rotating its own log files, let logrotate do it, and no unscheduled data loss will occur. This can be achieved by setting the logsize config value very high (say 500M). This does not present a danger of running out of disk space.

In its current state, it looks as if logrotate is working correctly, but if you have a busy server, it's actually losing data - uncompress your archived logs and you'll find they have gaps in, which is what has happened to me.

Marcus
-- 
Marcus Bointon
Technical Director, Synchromedia Limited

Creators of http://www.smartmessages.net/
UK 1CRM solutions http://www.syniah.com/
marcus at synchromedia.co.uk | http://www.synchromedia.co.uk/



More information about the pkg-multimedia-maintainers mailing list