Bug 1247766

Summary: dnf logrotate.d rotates logs too fast in many cases
Product: [Fedora] Fedora Reporter: Chris Siebenmann <cks-rhbugzilla>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: cks-rhbugzilla, jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.1.1-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-09 23:19:28 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:

Description Chris Siebenmann 2015-07-28 20:02:22 UTC
Description of problem:

Dnf's currently shipped /etc/logrotate.d/dnf specifies 'maxsize 30k'.
In many cases this causes *daily* rotation of DNF logfiles (because dnf
logs a lot of debugging information to eg /var/log/dnf.log). However the
dnf logrotate leaves the /etc/logrotate.conf 'rotate 4' setting unchanged,
resulting in effectively keeping only four days of logs.

The standard /etc/logrotate.conf settings of 'weekly' plus 'rotate 4'
is intended to keep four weeks of logs around. Dnf should respect these
settings one way or another, either by removing its own 'maxsize' and
'yearly' settings and relying on logrotate.conf for weekly rotation,
or by expicitly specifying long enough 'rotate N' settings so that it
keeps four weeks of logs with the de facto daily log rotation.

My personal view is that dnf should take the first option. I don't
see why dnf has a particularly strong reason to override the normal
logrotate.conf settings, especially since local system administrators
may want to change them to eg lengthen all log retention times.

Version-Release number of selected component (if applicable):

dnf-1.0.1-2.fc22.noarch
dnf-conf-1.0.1-2.fc22.noarch

Comment 1 Honza Silhan 2015-08-11 11:52:58 UTC
Thanks for the report. We can do that.

Comment 3 Fedora Update System 2015-09-01 09:51:51 UTC
dnf-plugins-core-0.1.11-1.fc23 dnf-1.1.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 4 Fedora Update System 2015-09-01 20:22:32 UTC
dnf-1.1.1-1.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 5 Fedora Update System 2015-09-08 12:38:46 UTC
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744

Comment 6 Fedora Update System 2015-09-08 12:38:54 UTC
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744

Comment 7 Fedora Update System 2015-09-08 12:39:56 UTC
dnf-1.1.1-2.fc23 dnf-plugins-core-0.1.11-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 8 Fedora Update System 2015-09-08 17:51:54 UTC
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743

Comment 9 Fedora Update System 2015-09-08 21:26:22 UTC
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugins-core dnf'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744

Comment 10 Fedora Update System 2015-09-09 23:19:00 UTC
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-09-23 04:12:04 UTC
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.