does our log rotation do the right thing?
Our logrotate.conf file uses the rotate, compress, and sharedscripts flags, and has a postrotate script which sends a signal telling the daemon to change log files.As I read the logrotate man page (http://linux.die.net/man/8/logrotate), the order these are invoked is:
for each Ceph file:
- move file to new location
- compress file
- invoke postrotate script
So I think there might be a race here where we rotate a file, compress it while it's still being written to, and then switch to a new file. The delaycompress flag will wait until the next rotation period to do the actual compression, which would close the race but obviously doesn't let you compress quickly.
Or maybe I'm misreading the man page, or it's just lying: in my understanding it's basically impossible to use logrotate sanely to avoid this race...