Description of problem: The supplied logrotate config keeps all the log files forever. The glusterfs logrotate config will keep the last 52 weeks, which would make sense. This applies to the ganesha and the ganesha-gfapi log files! Version-Release number of selected component (if applicable): glusterfs-ganesha-3.7.9-12.el7rhgs.x86_64 # ganesha.nfsd -v nfs-ganesha compiled on Jun 7 2016 at 10:54:26 Release = V2.3.1 Steps to Reproduce: 1. Use NFS-ganesha 2. Observe how local storage slowly gets filled up Actual results: Log files are rotated but never removed Expected results: Log files should be removed "eventually" Additional info: # cat /etc/logrotate.d/ganesha /var/log/ganesha.log { copytruncate dateext compress )
Patch posted upstream for review : https://review.gerrithub.io/#/c/359524/
Jiffin, Logrotate is still keeping logs in ganesha.log and ganesha-gfapi.log.Seems the path is wrong in files.(/var/log/ganesha/ganesha.log) # cat /etc/logrotate.d/ganesha /var/log/ganesha/ganesha.log { weekly rotate 52 copytruncate dateext compress missingok } # cat /etc/logrotate.d/ganesha-gfapi /var/log/ganesha/ganesha-gfapi.log { weekly rotate 52 copytruncate dateext compress missingok } ======= # logrotate -vf /etc/logrotate.d/ganesha reading config file /etc/logrotate.d/ganesha Allocating hash table for state file, size 15360 B Handling 1 logs rotating pattern: /var/log/ganesha/ganesha.log forced from command line (52 rotations) empty log files are rotated, old logs are removed considering log /var/log/ganesha/ganesha.log error: skipping "/var/log/ganesha/ganesha.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. set default create context ======
Moving it to Assigned state
As Manisha pointed out the path in logrotate configuration is wrong. I am attaching patch for that. For testing the patch, following should be done : * use logrotate force option to create a logrotated file logrotate -vf /etc/logrotate.d/ganesha * Change system date to 1 week ahead and again use logrotate force option to create a file This will create upto 52 files and from 53rd file onwards , the oldest one will be deleted.
Created attachment 1288306 [details] downstream patch
Verified this bug on # rpm -qa | grep ganesha nfs-ganesha-debuginfo-2.4.4-10.el7rhgs.x86_64 glusterfs-ganesha-3.8.4-31.el7rhgs.x86_64 nfs-ganesha-2.4.4-10.el7rhgs.x86_64 nfs-ganesha-gluster-2.4.4-10.el7rhgs.x86_64 ganesha.log and ganesha-gfapi.log files gets deleted once it reached the specified days cycles mentioned in /etc/logrotate.d/ganesha and /etc/logrotate.d/ganesha-gfapi Moving this bug to verified state
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:2779