[PATCH] Re: Adding a lock file to plague server Repo.py _update_repo()

Dan Williams dcbw at redhat.com
Fri Jun 2 14:56:00 UTC 2006


On Sat, 2006-05-20 at 16:50 +0200, Michael Schwendt wrote:
> On Wed, 17 May 2006 12:00:56 +0200, Michael Schwendt wrote:
> 
> > Currently, when we sign and push built packages, we move them out of a
> > "repodir" while the build server may be copying new packages to that
> > directory.
> > 
> > We have not cleaned up repodir for a long time either, because it could
> > not be done automatically without risk. The corresponding section in the
> > push script contains a "todo" comment only. [Recently I've used a separate
> > script, however, which cleans up the directory after a push, provided that
> > the build system is idle and no package is about to be copied into the
> > directory at the same time.]
> > 
> > I've looked at Repo.py _update_repo() where I see nothing which prevents
> > concurrent access to this repodir. Is there anything I'm missing when
> > thinking that it is possible to add a simple lock file at the root of
> > repodir in order to control access to this directory?  The build master
> > would lock the file when copying new packages to it. And the push script
> > would lock the file when moving packages and when cleaning up. Both would
> > sleep when they cannot acquire the lock.
> 
> Attached patch explains in code what I have in mind.

Thanks, a modified version of this patch has been committed to HEAD, and
I plan to commit one to STABLE_4 as well.

Dan





More information about the Fedora-buildsys-list mailing list