Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183134 - mysql-init-scripts-1.2 does not check if mysql is running when logrotate postrotate is executed
Summary: mysql-init-scripts-1.2 does not check if mysql is running when logrotate post...
Status: RESOLVED DUPLICATE of bug 172870
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-25 11:19 UTC by Alexander Stoll
Modified: 2007-06-25 11:31 UTC (History)
0 users

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 Alexander Stoll 2007-06-25 11:19:28 UTC
The mysql specific include file for logrotate (/etc/logrotate.d/mysql) does not check for the existance of the pid file when the postrotate kill... is executed.
When mysql is not running, the logrotate cronjob executes the postrotate part and bails out for the not existent pid file, because there is no when mysql is not running. All following logrotate include files are not executed... :-(


Reproducible: Always

Steps to Reproduce:
1. have the logrotate include installes
2. stop mysql
3. execute logrotate and watch it bail out for the missing file

Actual Results:  
logrotate does not rotate for includes after mysql

Expected Results:  
check for existance of the pidfile before executing "kill...."

I fixed this for a single instance of mysql with a simple check:

if [ -f /var/run/mysqld/mysqld.pid ]; then \
    /bin/kill -HUP `cat /var/run/mysqld/mysqld.pid`
fi;

The logrotate include is not sufficient for multiple instances of mysql...
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-06-25 11:31:49 UTC

*** This bug has been marked as a duplicate of bug 172870 ***