[Bugs] [Bug 1158456] New: glusterfs logrotate config file pollutes global config

bugzilla at redhat.com bugzilla at redhat.com
Wed Oct 29 12:31:55 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1158456

            Bug ID: 1158456
           Summary: glusterfs logrotate config file pollutes global config
           Product: GlusterFS
           Version: 3.6.0
         Component: logging
          Keywords: EasyFix, Triaged
          Severity: high
          Priority: medium
          Assignee: bugs at gluster.org
          Reporter: lmohanty at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com,
                    lmohanty at redhat.com, ndevos at redhat.com
        Depends On: 1126802
            Blocks: 1126801



+++ This bug was initially created as a clone of Bug #1126802 +++

+++ This bug was initially created as a clone of Bug #1126801 +++
+++                                                           +++
+++ This bug is for the master branch                         +++
+++                                                           +++

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
missingok

compress
delaycompress
notifempty

"""

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):

glusterfs-3.5.2-1.fc20


How reproducible:

Very.


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.

--- Additional comment from Niels de Vos on 2014-10-27 06:15:20 EDT ---



--- Additional comment from Anand Avati on 2014-10-28 15:18:19 EDT ---

REVIEW: http://review.gluster.org/8994 (logrotate: gluster logrotate config
should not be global) posted (#1) for review on master by Lalatendu Mohanty
(lmohanty at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1126801
[Bug 1126801] glusterfs logrotate config file pollutes global config
https://bugzilla.redhat.com/show_bug.cgi?id=1126802
[Bug 1126802] glusterfs logrotate config file pollutes global config
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list