Cleaning scratch & work directories

steve.webb at beatport.com steve.webb at beatport.com
Thu Jan 27 17:06:35 UTC 2011


tmpwatch works well for this.  I've been using it for a few days now and 
it works well.

- Steve

On Thu, 20 Jan 2011, Mike McLean wrote:

> On 01/20/2011 05:05 PM, Anthony Messina wrote:
>> I'm continuing work a on a private Koji instance (Kerberos) and am now
>> working on automating cleanup, etc.
>>
>> It is mentioned here
>> http://lists.fedoraproject.org/pipermail/buildsys/2010-December/003415.html
>> that "Koji leaves it to the administrator to clean out the scratch build
>> directory."
>>
>> Is there anything special about cleaning up scratch builds or the
>> work/{cli-build,cli-import,tasks} directories for that matter?
>>
>> Do I need to interact with the Koji database in any way to let koji know
>> these files are gone? What I mean is, can I simply remove the files and
>> directories without any Koji integration?
>
> The contents of work and scratch are not tracked in the database. The
> mechanism I use is a simple cron job that simply looks at modification
> times.
>
> The main things you want to watch out for is deleting things too early.
> Scratch builds aren't much use to anyone if you delete them before the
> builder gets a chance to poke at them. The work directory is used as a
> temporary holding zone by some tasks, so you don't want to delete stuff
> out from under a running task. A reasonable time-based check is
> sufficient to avoid this.
>
> In my koji instance we keep content under work/ for two weeks and
> content under scratch/ for one week.
>
> Using tmpwatch is a another possibility. I believe it looks at access
> times by default.
> --
> buildsys mailing list
> buildsys at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/buildsys
>

-- 
Steve Webb | System Administrator
Beatport | Play With Music
------------------------------------------
2399 Blake Street, Suite 170
Denver, Colorado USA 80205
tel: +1.720.932.9103
fax: +1.720.932.9104
noc: +1.303.565.2710
mobile: +1.303.564.4269


More information about the buildsys mailing list