Last modified: 2013-04-25 08:07:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43104, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41104 - glusterfs log files are not rotated
glusterfs log files are not rotated
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
Infrastructure (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Andrew Bogott
:
Depends on:
Blocks: 43703
  Show dependency treegraph
 
Reported: 2012-10-17 11:09 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-04-25 08:07 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2012-10-17 11:09:25 UTC
On instances we have fuse.glusterfs mount which send information logs to /var/log/glusterfs . For example:


hashar@deployment-jobrunner06:/var/log/glusterfs$ ll
total 3920
-rw------- 1 root root   31039 Sep 20 22:38 data-home.log
-rw-r--r-- 1 root root 3972261 Oct 17 11:08 data-project.log


The data-project.log file eventually filled all the disk space. To prevent this, any log file should probably be rotated on a weekly basis at least and purged after sometime.
Comment 1 Antoine "hashar" Musso (WMF) 2012-12-04 08:33:22 UTC
Raising priority, this killed the beta apaches boxes.  /var/log is in the / partition so a full disk cause a lot of issues.
Comment 2 Antoine "hashar" Musso (WMF) 2013-01-07 14:27:34 UTC
Raising priority again. This has again killed several beta boxes over the last two weeks.
Comment 3 Andrew Bogott 2013-01-08 00:25:28 UTC
There were several broken links within /data/project/apache which seemed to be making gluster lose its mind.  Obviously that's a gluster bug, but I don't have much insight into why it couldn't cope.

I removed the broken files that gluster was complaining about, and replaced them via 'git reset --hard'.  This appears to have quelled gluster's fears, and I'm pretty sure the actual files are still the way I found them.

I have a test box set up doing a rotation test with gluster log files.  Presuming that test goes well I'll commit that change in a couple of days.
Comment 4 Antoine "hashar" Musso (WMF) 2013-01-08 22:47:54 UTC
https://gerrit.wikimedia.org/r/#/c/42796/
Comment 5 Antoine "hashar" Musso (WMF) 2013-01-14 12:32:05 UTC
Seems to rotate fine now :-]  Thanks Andrew!
Comment 6 Ryan Lane 2013-01-14 17:49:22 UTC
I think they are rotating improperly on the servers now, though. The log files show 0 as their file size. I'd imagine it's still writing to the old inodes there.
Comment 7 Andrew Bogott 2013-01-14 22:53:12 UTC
Logs on the server should be fixed by

https://gerrit.wikimedia.org/r/#/c/43962/1/files/logrotate/glusterlogs
Comment 8 Antoine "hashar" Musso (WMF) 2013-03-01 18:24:06 UTC
Looks like like the logrotate does not work anymore:


root@deployment-bastion:/var/log/glusterfs# ll -rt
total 213956
-rw------- 1 root root         0 Feb 19 06:27 home.log
-rw------- 1 root root         0 Feb 19 06:27 data-project.log
-rw------- 1 root root 109185374 Mar  1 18:12 data-project.log.1
-rw------- 1 root root 109894887 Mar  1 18:17 home.log.1

I noticed the instance has two logrorate configuration files which are most probably conflicting:

/etc/logrotate.d/glusterfs-common 


/var/log/glusterfs/*.log {
	daily
	rotate 7
	delaycompress
	compress
	notifempty
	missingok
}


And the puppet provided one:


cat glusterlogs 
#####################################################################
### THIS FILE IS MANAGED BY PUPPET
### puppet:///files/logrotate/glusterlogs
#####################################################################


# Rotate client logs
/var/log/glusterfs/*.log {
	missingok
	rotate 3
	weekly
	compress
	postrotate
		/usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true
		/usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true
	endscript
}

# Rotate server brick logs
/var/log/glusterfs/bricks/*.log {
	missingok
	rotate 3
	weekly
	compress
	postrotate
		/usr/bin/killall -HUP glusterfsd > /dev/null 2>&1 || true
	endscript
}


The glusterfs-common package does provide /etc/logrotate.d/glustefs-common and it is missing the HUP signaling :(
Comment 9 Antoine "hashar" Musso (WMF) 2013-03-26 11:38:32 UTC
I have emailed Andrew to find out the status of this bug.
Comment 10 Andrew Bogott 2013-03-28 22:35:36 UTC
Note to self:  I removed the gluster-installed log rotate on testlabs-abogott-dev; now waiting a few days to see if it shapes up
Comment 11 Andrew Bogott 2013-04-03 21:44:00 UTC
Yep, removing gluster's file helps.  So...

https://gerrit.wikimedia.org/r/#/c/57426/
Comment 12 Antoine "hashar" Musso (WMF) 2013-04-25 08:07:01 UTC
Seems to works now, and the rotated files get compressed.  Thank you Andrew!

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


Navigation
Links