Last modified: 2014-11-03 14:43:28 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 T74859, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72859 - /var/log/diamond is not logrotated
/var/log/diamond is not logrotated
Status: RESOLVED WORKSFORME
Product: Wikimedia Labs
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-01 12:26 UTC by Tim Landscheidt
Modified: 2014-11-03 14:43 UTC (History)
9 users (show)

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


Attachments

Description Tim Landscheidt 2014-11-01 12:26:15 UTC
On tools-dev /var was filled up, so I looked at /var/log and saw that the log files in /var/log/diamond are never logrotated, leaving stuff from the summer behind.  I'll remove log files there that are older than five weeks, but we should add the logs to the general logrotate configuration.  This probably needs to be resolved properly upstream.

(As a side-effect, this will probably also fix bug #69602.)
Comment 1 Tim Landscheidt 2014-11-01 13:40:07 UTC
Apparently, upstream for python-diamond is https://gerrit.wikimedia.org/r/#/admin/projects/operations/debs/python-diamond, so I cloned the repository and:

| scfc@tools-dev:~/src/python-diamond$ make deb
| ./version.sh > version.txt
| dch --newversion ..0-github_archive --distribution unstable --force-distribution -b "Last Commit: (2014-10-24 16:26:51 +0100) c58381511aeac2383bc51b35c406483d4e7a827f Filippo Giunchedi <fgiunchedi@wikimedia.org>"
| dch warning: Recognised distributions are:
| {hardy,lucid,maverick,natty,oneiric,precise,quantal}{,-updates,-security,-proposed,-backports} and UNRELEASED.
| Using your request anyway.
| dch: fatal error at line 484:
| Cannot find debian/changelog anywhere!
| Are you in the source code tree?
| (You could use --create if you wish to create this file.)
| make: *** [builddeb] Fehler 255
| scfc@tools-dev:~/src/python-diamond$
Comment 2 Filippo Giunchedi 2014-11-03 10:09:21 UTC
not rotating diamond log files used to be the case a while ago, however that should be fixed in production and labs now, is the instance running an updated puppet? how long has diamond been running for?

re: package, it should be enough do run debuild and not upstream's Makefile to have a working debian package (see also https://gerrit.wikimedia.org/r/#/c/168599/)
Comment 3 Yuvi Panda 2014-11-03 10:43:33 UTC
They are rotated by diamond itself - it uses https://docs.python.org/2/library/logging.handlers.html#rotatingfilehandler to accomplish this. Is specified in diamond.conf.erb. The older files are just really old leftovers from before we turned on rotation.
Comment 4 Tim Landscheidt 2014-11-03 14:18:43 UTC
So this means that a daemon needs to run, or otherwise the log files are not rotated?  *argl*

(Not really WORKSFORME, but ...)
Comment 5 Filippo Giunchedi 2014-11-03 14:43:28 UTC
not sure what you mean, the daemon that does the writing is the same that does the rotation, if it isn't running then no log files are written to either

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


Navigation
Links