Bug 722794

Summary: dracut.logrotate is put in a subdirectory
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: bugs.michael, harald, jonathan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dracut-009-12.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-26 03:31:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Göran Uddeborg 2011-07-17 21:08:11 UTC
Description of problem:
While debugging another issue, I ran logrotate in verbose mode.  When I did, I got this message:

  logrotate: Ignoring dracut because it's not a regular file.

Version-Release number of selected component (if applicable):
dracut-009-11.fc15.noarch

How reproducible:
Every time

Steps to Reproduce:
1. /usr/sbin/logrotate --verbose /etc/logrotate.conf

Additional information:
All my dracut.log files are more than 30kB in size, so they meet that criteria.  But since the rotation is only yearly, maybe they wouldn't have been rotated anyway.  From the content of the logs, it seems dracut started writing this log file rather recently.

Comment 1 Fedora Update System 2011-07-18 14:26:40 UTC
dracut-009-12.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/dracut-009-12.fc15

Comment 2 Michael Schwendt 2011-07-18 17:42:56 UTC
Just have run into this, and the spec file doesn't comment on it either. The logs won't rotate because of the "yearly":

| rotating pattern: /var/log/dracut.log  yearly (4 rotations)
| empty log files are not rotated, only log files >= 30720 bytes are rotated,
| old logs are removed
| considering log /var/log/dracut.log
|  log does not need rotating

# ls -s /var/log/dracut.log 
564 /var/log/dracut.log



Further, the %attr value in the spec file doesn't match the create mode in the logrotate file. 0644 vs 0600:

# grep create /etc/logrotate.d/dracut_log 
    create 0600 root root


-# logfile needs no logrotate, because it gets overwritten
-# for every dracut run
+%config(noreplace) /etc/logrotate.d/dracut_log
 %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log

Comment 3 Fedora Update System 2011-07-18 22:36:38 UTC
Package dracut-009-12.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-009-12.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/dracut-009-12.fc15
then log in and leave karma (feedback).

Comment 4 Göran Uddeborg 2011-07-19 09:13:48 UTC
The file placement is fixed in -12.fc15.  I've added karma.

While related, the issues mentioned in comment 2 are really different issues, so it didn't feel like a reason to block THIS bugzilla.  (The attribute mismatch looks like a plain bug, while the rotation cycle is something one could argue, I guess.)

Comment 5 Fedora Update System 2011-07-26 03:30:59 UTC
dracut-009-12.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.