Closed
Bug 629338
Opened 15 years ago
Closed 15 years ago
consider adding "-prune" to cleanup cronjobs that use find
Categories
(Release Engineering :: General, defect, P2)
Release Engineering
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: coop)
Details
(Whiteboard: [cleanup])
We got all sorts of cronmail from cronjobs with errors like:
find: /data/ftp/pub/firefox/nightly/2011/01/2011-01-21-17-mozilla-central: No such file or directory
find: /data/ftp/pub/firefox/nightly/2011/01/2011-01-21-07-mozilla-1.9.1: No such file or directory
find: /data/ftp/pub/firefox/nightly/2011/01/2011-01-16-03-mozilla-1.9.2-l10n: No such file or directory
I believe that we can fix them with adding "-prune" to these cronjobs. See below for an example.
Without prune:
[] bhearsum@voot:~/tmp/test$ mkdir -p 1/2/3/4/5
[] bhearsum@voot:~/tmp/test$ find . -name 3 -exec rm -rf {} \;
find: `./1/2/3': No such file or directory
[] bhearsum@voot:~/tmp/test$ find .
.
./1
./1/2
With prune:
[] bhearsum@voot:~/tmp/test$ mkdir -p 1/2/3/4/5
[] bhearsum@voot:~/tmp/test$ find . -name 3 -prune -exec rm -rf {} \;
[] bhearsum@voot:~/tmp/test$ find .
.
./1
./1/2
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → coop
Whiteboard: [cleanup]
| Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
OS: Linux → All
Priority: P3 → P2
Hardware: x86_64 → All
| Assignee | ||
Comment 1•15 years ago
|
||
I've added -prune to the ffxbld/trybld cron jobs on stage.
In most cases the jobs are running concurrently (@hourly) and probably trampling over each other, so hopefully this will help.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 2•15 years ago
|
||
FWIW, I've had to roll this back in almost every case. Adding -prune actually prevents the cronjob from doing it's intended cleanup.
To make this work, we'd need to switch to guaranteed two-step cronjobs for all our cleanups where we'd remove old files first and then remove empty dirs.
The alternative is to live with a few missing dirs in the emails (status quo).
Updated•12 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•