On 2019-09-19 11:27:37 +0200, Vincent Lefevre wrote:
> So, the rotation occurs at midnight, according to the systemd timer.
> This conflicts with the crontab configuration.

Hmm... I see that /etc/cron.daily/logrotate disables the rotation
by cron in case of systemd. So, the issue with the missing mail is
due to the systemd timer, which just outputs the error message in
the logs (not sufficient as a manual intervention is needed). In
any case, this is different from the original bug. I've reported
a new bug for this particular problem.

Now, I still don't understand why the logs are not rotated since
gzip is actually fine with the date 1904-01-01: this is just a
warning. Test:

cventin% rm -f test.txt*
cventin% echo blah > test.txt 
cventin% touch -d 1904-01-01 test.txt
cventin% ls -l test.txt*
-rw-r--r-- 1 vlefevre vlefevre 5 1904-01-01 00:00:00 test.txt
cventin% gzip test.txt 
gzip: test.txt: warning: file timestamp out of range for gzip format
cventin% ls -l test.txt*
-rw-r--r-- 1 vlefevre vlefevre 34 1904-01-01 00:00:00 test.txt.gz

i.e. the file got compressed as expected.

Really, this warning does not matter, in particular for log files.
Thus logrotate should ignore it.

BTW, even if the file could not be compressed, I think that the best
solution would be to rotate anyway.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to