Proper log-rotation for upstart

Asked by Михаїл Т. on 2017-11-29

Every once in a while we receive an e-mail from cron-spawned logrotate with the following error:

    gzip: stdin: file size changed while zipping

By matching the timestamp on the e-mail with that of the actual *.gz files under /var/log, I deduced, that these are all from the /var/log/upstart/

Indeed, running `lsof | grep /var/log/upstart/`, I can see the following three entries indicating, there remain files still opened (for writing!) although deleted from the filesystem:

init 1 root 8w REG 202,2 4795 39117 /var/log/upstart/php5.6-fpm.log.1 (deleted)
init 1 root 9w REG 202,2 766 39013 /var/log/upstart/php7.1-fpm.log.1 (deleted)
init 1 root 14w REG 202,2 190 5026 /var/log/upstart/acpid.log.1 (deleted)

It would seem like the /etc/logrotate.d/upstart file installed by the upstart package needs to have a postrotate-entry, but I'm not sure. Does it? What would the entry say?

This is with upstart-1.12.1-0ubuntu4.2 on 14.04.5 LTS. Please, advise. Thank you.

Question information

English Edit question
upstart Edit question
No assignee Edit question
Last query:
Last reply:
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.