Bug 904059

Summary: missing logrotate script
Product: Red Hat Enterprise Linux 5 Reporter: Karel Volný <kvolny>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED WORKSFORME QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.10CC: byte, hhorak
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 904061 (view as bug list) Environment:
Last Closed: 2013-01-25 14:19:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 904061    

Description Karel Volný 2013-01-25 11:54:41 UTC
Description of problem:
Mysql packages do not provide logrotate configuration file.
Looking at bug #647223 comment #16 I understand that as it should be included after the problem with rotating logs gets fixed. The problem got fixed already but we still do not provide /etc/logrotate.d/mysqld

Version-Release number of selected component (if applicable):
mysql-5.0.95-5.el5_9

How reproducible:
always

Steps to Reproduce:
1. yum install mysql-server
2. uncomment the configuration in /etc/logrotate.d/mysqld
3. logrotate -f /etc/logrotate.d/mysqld

Actual results:
2. no file to edit
3. error: cannot stat /etc/logrotate.d/mysqld: No such file or directory

Expected results:
no error; once the server runs and writes logfile, logs get rotated after logrotate call

Additional info:

Comment 1 Honza Horak 2013-01-25 12:22:42 UTC
I don't see any issue on my RHEL-5 VM:

[hhorak@localmaster ~]$ ll /etc/logrotate.d/mysqld 
error: file /etc/logrotate.d/mysqld: No such file or directory

[hhorak@localmaster ~]$ sudo yum install ./mysql-5.0.95-5.el5_9.x86_64.rpm ./mysql-server-5.0.95-5.el5_9.x86_64.rpm 

 ...

Installed:
  mysql-server.x86_64 0:5.0.95-5.el5_9
  mysql.x86_64 0:5.0.95-5.el5_9   

Complete!

[hhorak@localmaster ~]$ ll /etc/logrotate.d/mysqld 
-rw-r--r-- 1 root root 871 Jan  8 18:14 /etc/logrotate.d/mysqld

[hhorak@localmaster ~]$ rpm -qf /etc/logrotate.d/mysqld
mysql-server-5.0.95-5.el5_9

[hhorak@localmaster ~]$ sudo logrotate -f /etc/logrotate.d/mysqld

[hhorak@localmaster ~]$ echo $?
0

Comment 2 Honza Horak 2013-01-25 12:24:02 UTC
Couldn't this be caused by an issue in test case?

Comment 3 Karel Volný 2013-01-25 14:19:46 UTC
now I'm pretty confused ...

I saw this problem on RHEL6

so I wanted to check on RHEL5 from where the original bug emerged

looking at it carefully again, I see that both mysql-server-5.0.95-5.el5 and mysql-server-5.0.95-3.el5 include the file

maybe I have mistaken terminals before, taking half from one and half from another?

sorry :-(

Comment 4 Tom Lane 2013-01-25 14:50:54 UTC
Sounds likely.  The problem is certainly real in RHEL6 --- it doesn't look like we ever propagated the logrotate changes into that branch.  But RHEL5 has the fix.