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

Michael Schwendt bugs.michael at gmx.net
Sat May 20 14:50:19 UTC 2006


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Repo.py.patch
Type: application/octet-stream
Size: 1204 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20060520/fe63c5e9/attachment.obj>


More information about the Fedora-buildsys-list mailing list