Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487256 - =app-admin/rsyslog-7.4.4 logrotate broken with openrc
Summary: =app-admin/rsyslog-7.4.4 logrotate broken with openrc
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 486294
  Show dependency tree
 
Reported: 2013-10-07 23:50 UTC by Patrick McLean
Modified: 2014-05-20 13:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McLean gentoo-dev 2013-10-07 23:50:55 UTC
New logrotate script broken with openrc, with the new version, /var/log/messages gets rotated, but logrotate never gets a signal telling it to reopen the log files so it never switches to the new file.

The log file also never gets rotated after the first failed rotation, likely because logrotate doesn't see the point in rotating a 0 byte file.

# ls -la /var/log/messages*
-rw-r--r-- 1 root root    0 Sep 22 03:10 /var/log/messages
-rw-r--r-- 1 root root 542M Oct  1 20:58 /var/log/messages-20130922
Comment 1 Patrick McLean gentoo-dev 2013-10-08 00:17:09 UTC
The new logrotate script also appears to try to rotate a bunch of files that the default gentoo config does not generate, and does not rotate ones that are generated.

Here is an older version of the file:
/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log {
    sharedscripts
    postrotate
        /etc/init.d/rsyslog reload &>/dev/null || true
    endscript
}

Here is the new one:
/var/log/syslog
{
    rotate 1
    daily
    missingok
    notifempty
    delaycompress
    compress
    postrotate
        kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null || true
    endscript
}

/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
{
    rotate 1
    weekly
    missingok
    notifempty
    compress
    delaycompress
    sharedscripts
    postrotate
        kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null || true
    endscript
}

It seems like the new version was copied verbatim from another distro, and not updated to support gentoo properly.
Comment 2 Pacho Ramos gentoo-dev 2013-10-19 07:55:53 UTC
The logrotate script hasn't changed between all versions currently in the tree, it is the one from files/7-stable/rsyslog.logrotate :/
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2013-11-05 11:25:18 UTC
What's your logrotate version? Please verify that you are not affected by the already fixed bug 476720 (and bug 476202).

Also, logrotate-3.8.7 is working fine on all my systems with rsyslog-7.4.4. Like Pacho said, the logrotate files weren't changed. May I ask why this bug got marked as "confirmed"?
Comment 4 Ultrabug gentoo-dev 2014-05-20 13:17:12 UTC
Please reopen if you have something to add mate.