Bug 1126788 - glusterfs.spec: deprecate *.logrotate files in dist-git in favor of the upstream logrotate files:
Summary: glusterfs.spec: deprecate *.logrotate files in dist-git in favor of the upstr...
Alias: None
Product: Fedora
Classification: Fedora
Component: glusterfs
Version: 20
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kaleb KEITHLEY
QA Contact: Fedora Extras Quality Assurance
: 1133704 1172641 (view as bug list)
Depends On: 1126801
Blocks: 1126832
TreeView+ depends on / blocked
Reported: 2014-08-05 09:45 UTC by Cong Ma
Modified: 2016-08-23 12:35 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1126832 (view as bug list)
Last Closed: 2015-05-20 17:14:33 UTC

Attachments (Terms of Use)

Description Cong Ma 2014-08-05 09:45:40 UTC
Description of problem:

Glusterfs's logrotate config file in the /etc/logrotate.d directory pollutes logrotate's global config file at /etc/logrotate.conf.  Namely, the file /etc/logrotate.d/glusterfs-georep has global directives in the beginning of the file that reads


rotate 52



When this file is included into logrotate's config file (line 18 of /etc/logrotate.conf, which reads "include /etc/logrotate.d"), it is splashed into the state of logrotate's config reader, "as if it was included inline" (man logrotate).  Therefore, those lines will override whatever corresponding configuration terms already present in /etc/logrotate.conf.

Especially, the "rotate 52" directive will delay the removal of old logs up to a year globally (!!), resulting in a large number of old logs that should have been deleted.

Please move the above directives inside the curly braces so they don't pollute the global config state.

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


How reproducible:


Steps to Reproduce:

1.  Install glusterfs.
2.  Watch old logs grow;  output of logrotate -d /etc/logrotate.conf showing "52 rotations" not just for glusterfs georeplication logs but almost all other logs.

Actual results:

Many old logs are not removed.  logrotate -d /etc/logrotate.conf output shows "52 rotations" for all logs processed after glusterfs-georep that don't override the "rotate" directive individually.

Expected results:

Should not have interfered with other logs.

Additional info:

The spurious old logs caused by this still needs manual removal after the fix, because logrotate, given "rotate 4" directive, won't even touch beyond the 5th log file.

Comment 1 Niels de Vos 2014-08-05 10:29:37 UTC
Filed upstream Gluster Community Bug 1126801 for getting a fix included in the next release.

This bug will be used to track the status of the fix for the Fedora package(s).

Comment 2 Kaleb KEITHLEY 2014-08-05 11:44:20 UTC
Upstream has extras/glusterfs{,-georep}-logrotate files which we should be using exclusively. 

Currently it appears that we install both the upstream and dist-git logrotate files in /etc/logrotate.d and because we use a wildcard in the %files section of the glusterfs.spec we (erroneously) package all of them.

Changed the summary accordingly.

Comment 3 Kaleb KEITHLEY 2014-08-28 13:49:54 UTC
*** Bug 1133704 has been marked as a duplicate of this bug. ***

Comment 4 Lalatendu Mohanty 2015-03-19 13:21:19 UTC
*** Bug 949706 has been marked as a duplicate of this bug. ***

Comment 5 Niels de Vos 2016-08-23 12:35:54 UTC
*** Bug 1172641 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.