Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#20428 - [logrotate] global config does not clean *all* logfiles

Attached to Project: Arch Linux
Opened by Dieter Plaetinck (Dieter_be) - Tuesday, 10 August 2010, 08:33 GMT
Last edited by Allan McRae (Allan) - Monday, 04 October 2010, 05:18 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hey,
usig latest logrotate (3.7.8-1)
from looking at /etc/logrotate.conf, it seems we want to apply a reasonable logrotation to all files in /var/log/ by default.

However, I have several logfiles which don't seem to be "catched" by the global/default rules, and which don't have specific rules on their own as well.
Some examples (files older then 4 weeks):
dieter@dieter-dellD620-arch ~ ls -lht /var/log/
(...)
-rw-r--r-- 1 root root 121K Jul 12 22:43 vbox-install.log
drwxr-xr-x 2 root lp 4.0K Jun 29 11:01 cups
-rw-r--r-- 1 root root 0 Jun 8 11:26 slapd.log
drwxrwxrwx 2 root root 20 Jun 7 10:47 pla
drwxrwxrwx 2 root root 20 May 31 13:21 beidpkcs11
drwxr-xr-x 5 root root 37 May 1 13:58 libvirt
drwxr-xr-x 2 root root 6 Feb 26 05:56 old
-rw-r--r-- 1 root root 5.1K Jan 27 2010 crond
-rw-r--r-- 1 root root 46K Jan 24 2010 crond.1
-rw-r--r-- 1 root root 17K Dec 13 2009 crond.2
-rw-r--r-- 1 root root 15K Dec 6 2009 crond.3
-rw-r--r-- 1 root root 11K Nov 26 2009 crond.4
drwxr-x--- 2 1001 110 30 Nov 9 2009 zabbix
drwxr-xr-x 2 root root 20 Aug 4 2009 ConsoleKit
drwxrwxrwx 2 mpd mpd 36 Jan 13 2009 mpd
-rw-r--r-- 1 mysql root 0 Jan 7 2009 mysqld.log
-rw------- 1 root root 0 Jan 4 2009 btmp
drwxr-xr-x 2 root root 6 Aug 16 2008 iptraf
dieter@dieter-dellD620-arch ~ ls -l /var/log/mpd/
total 76
-rwxrwxrwx 1 mpd mpd 6720 Aug 4 2009 mpd.error
-rwxrwxrwx 1 mpd mpd 67115 Sep 12 2009 mpd.log

dieter@dieter-dellD620-arch ~ ls -lht /etc/logrotate.d/
-rw-r--r-- 1 root root 162 May 1 13:58 libvirtd.lxc
-rw-r--r-- 1 root root 163 May 1 13:58 libvirtd.qemu
-rw-r--r-- 1 root root 162 May 1 13:58 libvirtd.uml
-rw-r--r-- 1 root root 462 Feb 24 04:12 syslog-ng
-rw-r--r-- 1 root root 63 Oct 20 2009 lirc
-rw-r--r-- 1 root root 136 Sep 16 2009 httpd
-rw-r--r-- 1 root root 171 Dec 12 2008 cups




This task depends upon

Closed by  Allan McRae (Allan)
Monday, 04 October 2010, 05:18 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See final comment
Comment by Jan de Groot (JGC) - Tuesday, 10 August 2010, 09:19 GMT
Subdirectories are never handled by default logrotate configuration. IMHO all regular files in the top level of /var/log should be handled by default logrotate configuration.
Comment by Allan McRae (Allan) - Thursday, 30 September 2010, 15:23 GMT
-rw-r--r-- 1 root root 5.1K Jan 27 2010 crond

Do you have cron going? That does not look like it...
Comment by Dieter Plaetinck (Dieter_be) - Thursday, 30 September 2010, 15:34 GMT
I do,
it seems that my cron was logging to /var/log/cron until jan 27, and to /var/log/crond.log afterwards. This corresponds with a bunch of package updates for cron before/around this period (http://repos.archlinux.org/wsvn/packages/dcron/repos/core-i686/?op=log&isdir=1&)

-rw-r----- 1 root log 4996 Sep 30 17:19 /var/log/crond.log
-rw-r----- 1 root log 8754 Sep 27 08:56 /var/log/crond.log.1
-rw-r----- 1 root log 15741 Sep 19 19:12 /var/log/crond.log.2
-rw-r----- 1 root log 11633 Sep 12 14:57 /var/log/crond.log.3
-rw-r----- 1 root log 11347 Sep 6 09:09 /var/log/crond.log.4


So that's an unrelated thing, although /var/log/crond is also one of those files that appararently never gets cleaned up.
Comment by Allan McRae (Allan) - Thursday, 30 September 2010, 15:55 GMT
OK. Thinking about this leads me to think that this is not a logrotate bug. It rotates exactly the files it is told to. I also do not think every file should be rotated by default. e.g. /var/log/pacman.log being a file that should never be rotated.

So my vote is that you file bug reports for the packages not rotating their logs to put the needed config file in /etc/logrotate.d/.

Loading...