Your message dated Tue, 4 Aug 2009 15:10:14 +0100
with message-id <[email protected]>
and subject line Local configuration mistake, closing.
has caused the Debian Bug report #534219,
regarding The logrotate conf doesn't HUP rsyslog effectively
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
534219: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534219
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: rsyslog
Version: 3.18.6-4
Severity: important
Tags: patch
The rsyslog package (and some others) install an extension conf
file at /etc/logrotate.d/rsyslog .
This file makes a noble effort at triggering rsyslog to start a
new file after rotation:
postrotate
invoke-rc.d rsyslog reload > /dev/null
endscript
However, it seems the environment in which the postrotate script
executes does not allow invoke-rc.d to be found via the path.
This can be easily reproduced by configuring logrotate to trigger
on a small file size with the 'delaycompress' option. Set up a
loop to generate log messages, and watch ls -lht on the directory.
Run logrotate manually, or have cron run it every minute to speed
the repro. Observe that logrotate rotates the files, but syslog
continues writing to the same filehandle (the file now ending
in .1).
One solution is to simply specify an absolute path for invoke-rc.d:
postrotate
/usr/sbin/invoke-rc.d rsyslog reload > /dev/null
endscript
Another solution might be to patch logrotate to use a login shell:
- logrotate.c(102): if (write(fd, "#!/bin/sh\n\n", 11) != 11 ||
+ logrotate.c(102): if (write(fd, "#!/bin/sh -\n\n", 11) != 11 ||
but that could have other effects and is probably outside the scope
of this bug.
Other packages (ones I don't have installed) are probably affected,
I don't know the best way to track them down and bug them.
Thanks,
- Marsh
--- rsyslog.orig 2009-02-07 18:35:24.000000000 -0600
+++ rsyslog 2009-06-22 10:37:02.000000000 -0500
@@ -7,7 +7,7 @@
delaycompress
compress
postrotate
- invoke-rc.d rsyslog reload > /dev/null
+ /usr/sbin/invoke-rc.d rsyslog reload > /dev/null
endscript
}
@@ -32,6 +32,6 @@
delaycompress
sharedscripts
postrotate
- invoke-rc.d rsyslog reload > /dev/null
+ /usr/sbin/invoke-rc.d rsyslog reload > /dev/null
endscript
}
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages rsyslog depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
Versions of packages rsyslog recommends:
ii logrotate 3.7.1-5 Log rotation utility
Versions of packages rsyslog suggests:
ii rsyslog-doc 3.18.6-4 documentation for rsyslog
pn rsyslog-mysql | rsyslog-pgsql <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
End user had changed the configuration of cron, such that /usr/sbin was no
longer on the path when logrotate was called by cron.
--
Paul Martin <[email protected]>
--- End Message ---