FS#18039 - [dcron] /etc/logrotate.d/crond refers to wrong pid file

Attached to Project: Arch Linux
Opened by Kay Abendroth (kay.abendroth) - Wednesday, 27 January 2010, 15:56 GMT
Last edited by Paul Mattal (paul) - Monday, 01 March 2010, 15:04 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Paul Mattal (paul)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

With the package dcron updated to version 4.4-1 a bug has been introduced in
the file /etc/logrotate.d/crond. The call to the kill command refers to a file
/var/run/cron.pid, but the appropriate pid file is /var/run/crond.pid instead.


Additional info:
* package version(s):
dcron 4.4-1
* config and/or log files etc.
The following line in /etc/logrotate.d/crond is wrong:
kill -HUP `cat /var/run/cron.pid`
and needs to be changed into:
kill -HUP `cat /var/run/crond.pid`


Steps to reproduce:
1. Install dcron 4.4-1.
2. `cat /etc/logrotate.d/crond`.
3. `ls -hall /var/run/cron.pid`.
4. `ls -hall /var/run/crond.pid`
This task depends upon

Closed by  Paul Mattal (paul)
Monday, 01 March 2010, 15:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 4.4-2 of dcron and syslog-ng 3.0.4-3.
Comment by Ralf Barth (Haggy) - Sunday, 31 January 2010, 15:12 GMT
Confirmed. Results in error mails from cron:

cat: /var/run/cron.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
error: error running shared postrotate script for '/var/log/crond.log '

Comment by Jim Pryor (Profjim) - Saturday, 06 February 2010, 13:12 GMT
Yeah, this definitely should not be cron.pid. However, sending a HUP signal to crond is really for when crond was started with the "-L logfile" option. Since Arch is using the "-S" syslogging option, this signal does nothing, We should really be sending a HUP to syslog-ng here, not to crond.
Comment by Paul Mattal (paul) - Saturday, 06 February 2010, 16:11 GMT
I think we're going to fix this and the larger bug it hides by putting the rotation of the cron logfile into syslog-ng's logrotate script, so it can be properly coordinated with HUPping syslogd.
Comment by Dale Blount (dale) - Monday, 01 March 2010, 15:02 GMT
status? can I help?
Comment by Paul Mattal (paul) - Monday, 01 March 2010, 15:03 GMT
Sorry, this is actually done now in 4.4-2, and I forgot to close it!

Loading...