Hide Forgot
Description of problem: The /etc/logrotate.d/syslog script has an error which may result in a log file being compressed while still open and being written to. The file should contain a 'delaycompress' line to prevent this from happening. You have to carefully read the logrotate manual to understand the order in which logrotate does things. Normally it is: rotate A, postrotate, compress A, rotate B, postrotate, compress B, .... But when sharedscripts is in effect the order is: rotate A, compress A, rotate B, compress B, ..., postrotate. Therefore without 'delaycompress' the logs being compressed will still be opened by the application and possibly will be written to while they are being compressed! Version-Release number of selected component (if applicable): rsyslog-5.8.5-1 How reproducible: Always Steps to Reproduce: 1. Quicker to read the logrotate manual and understand why the fault exists rather than undertake the complex series of steps it would require to reproduce. Actual results: Expected results: Additional info: The /etc/logrotate.d/syslog config file is also incorrectly named - it should be named rsyslog to match the remainder of the module (eg rsyslog.conf, init.d/rsyslog, rsyslog.d, rsyslogd.8.gz etc). That bug was reported many moons ago but it looks like everything has reverted back to a wrongly named syslog file again (if it was ever fixed).
Closing because not actually a bug. The documentation is misleading and has fooled others, viz: http://stackoverflow.com/questions/7271945/logrotate-compress-files-after-the-postrotate-script In actual fact when sharedscripts is in effect the order is: rotate A, rotate B, ..., postrotate, compress A, compress B, ...