+++ This bug was initially created as a clone of Bug #1126788 +++
+++ This bug is for the Community Gluster version 3.5.2 +++
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
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):
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.
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.
Should not have interfered with other logs.
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.
Working in it.
Patch for master is at http://review.gluster.org/8994
REVIEW: http://review.gluster.org/9001 (logrotate: gluster logrotate config should not be global) posted (#1) for review on release-3.5 by Lalatendu Mohanty (email@example.com)
COMMIT: http://review.gluster.org/9001 committed in release-3.5 by Niels de Vos (firstname.lastname@example.org)
Author: Lalatendu Mohanty <email@example.com>
Date: Thu Oct 30 01:11:02 2014 +0530
logrotate: gluster logrotate config should not be global
Issue : Previously glusterfs logrotate config file pollutes
global config. So moved the directives inside the curly braces,
so they don't pollute the global config state.
"Signed-off-by: Lalatendu Mohanty <firstname.lastname@example.org>"
"Reviewed-by: Niels de Vos <email@example.com>"
"Tested-by: Gluster Build System <firstname.lastname@example.org>"
(cherry picked from commit a5d73daabf6df95bc73b186d92f3e2d1239a6f8a)
Signed-off-by: Lalatendu Mohanty <email@example.com>
Tested-by: Gluster Build System <firstname.lastname@example.org>
Reviewed-by: Niels de Vos <email@example.com>
The second Beta for GlusterFS 3.5.3 has been released . Please verify if the release solves this bug report for you. In case the glusterfs-3.5.3beta2 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.
Packages for several distributions have been made available on  to make testing easier.
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.3, please reopen this bug report.
glusterfs-3.5.3 has been announced on the Gluster mailinglists , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.
This issue is not resolved. In the latest version for RHEL 7.1 (220.127.116.11-2.el7), the glusterfs-specific directives are still present outside their main block, thus affecting *all* logs system-wide that do not have an explicit rotation frequency set (why is it that the promise of a new release is regularly assumed to resolve existing bugs without actual verification of such?) ;)
$ cat /etc/logrotate.d/glusterfs
# perform the log rotate every week
# keep the backup of 52 weeks
# compress the logs, but from the .2 onwards
# Rotate client logs
/usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true
/usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true
$ rpm -qa|grep gluster
and more annoying is that qemu has dependencies on gluster, so this problam shows up in more than just gluster installations.
(In reply to Joe Pruett from comment #8)
> and more annoying is that qemu has dependencies on gluster, so this problam
> shows up in more than just gluster installations.
This is the upstream Gluster Community bug, and it definitely has been fixed there. You need to open a support case with on the Red Hat Customer Portal https://access.redhat.com/ so that the RHEL package can get fixed with a backport of the change.
sorry, just venting. there is a bug against rhel-6 about this issue.