Last modified: 2014-11-11 17:13:32 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 T75166, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73166 - OCG Old files removal cron fails
OCG Old files removal cron fails
Status: RESOLVED FIXED
Product: OCG
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal trivial
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-08 09:05 UTC by Yuvi Panda
Modified: 2014-11-11 17:13 UTC (History)
2 users (show)

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


Attachments

Description Yuvi Panda 2014-11-08 09:05:32 UTC
Cron <ocg@ocg1003> find /srv/deployment/ocg/output* -mtime +5 -exec rm {} \;

rm: cannot remove ‘/srv/deployment/ocg/output’: Is a directory


I'm unsure why this cron is being run, perhaps to clear out old files?
Comment 1 Yuvi Panda 2014-11-08 09:09:46 UTC
I also can not find the cron in puppet.
Comment 2 C. Scott Ananian 2014-11-10 17:19:39 UTC
I don't think this cron job should exist any more.  My guess is that an old puppet update removed this but forget to ensure => absent the old file?
Comment 3 Yuvi Panda 2014-11-10 20:39:25 UTC
Ah, that's likely.

Should we just manually remove it from the machines? How many are there anyway?
Comment 4 C. Scott Ananian 2014-11-10 21:08:24 UTC
I'm going to look at this today during the OCG deploy window, and manually clean up the cron jobs if I can find them.
Comment 5 C. Scott Ananian 2014-11-10 23:02:57 UTC
cscott@ocg1001:/etc$ sudo -u ocg -g ocg crontab -l
# HEADER: This file was autogenerated at 2014-07-28 18:00:32 +0000 by puppet.
# HEADER: While it can still be managed manually, it is definitely not recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: Clean up OCG postmortem directory
0 0 * * * find /srv/deployment/ocg/postmortem* -mtime +3 -exec rm {} \;
# Puppet Name: Clean up OCG output directory
0 0 * * * find /srv/deployment/ocg/output* -mtime +5 -exec rm {} \;


I haven't cleaned it up yet, but I did find it!
Comment 6 C. Scott Ananian 2014-11-11 17:12:16 UTC
After looking through the puppet repo for the 'correct' syntax to ensure->absent a cronjob, I decided to just clean this up manually.

For the record, these cronjobs were removed in https://gerrit.wikimedia.org/r/151133 but not actually removed by puppet.

cscott@ocg1001:~$ sudo -u ocg -g ocg crontab -r
cscott@ocg1002:~$ sudo -u ocg -g ocg crontab -r
cscott@ocg1003:~$ sudo -u ocg -g ocg crontab -r
root@deployment-pdf01:~# sudo -u ocg -g ocg crontab -r
root@deployment-pdf02:~# sudo -u ocg -g ocg crontab -r

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


Navigation
Links