Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57697 - A distfiles downloading lock, for use in a shared distfiles environment.
Summary: A distfiles downloading lock, for use in a shared distfiles environment.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-07-20 02:30 UTC by MAL
Modified: 2004-08-05 08:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MAL 2004-07-20 02:30:43 UTC
I have several Gentoo machines on our network that happily sync from one machine with large amounts of disk space.

I also have /usr/portage/distfiles NFS-mapped from each machine onto the sync master.  However, if two machines are emerging the same program at the same time, one will find the distfile half downloaded, and abort with a checksum error, or try and resume it, with disasterous results.

Could portage somehow lock out other "instances" from downloading a file, until the download is complete.  I guess this would require the other instances to wait, polling a flag - every second shouldn't cause too much bother.  If the download fails, another client could attempt the download.
I can forsee a possible problem if the downloading instance of portage crashes, leaving the lock in place - but this won't happen right ;)

I guess the ultimate solution, would be for the distfiles server to provide a distfiles-proxy, which the other portage instances can connect through when requesting distfiles, allowing the distfiles server to download the file itself, then pipe it to requesting clients.

Just an idea, I don't have enough time/python experience to patch portage, but it would certainly be a useful addition in large setups, especially with nightly mass-updates.

Reproducible: Always
Steps to Reproduce:
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-08-04 19:45:21 UTC
Take it for a spin please, it's in pre15 now.
I'd expect the locks to be screwwy on samba, should work on nfs from what I recall.
Comment 2 MAL 2004-08-05 08:12:34 UTC
I have tried it, and it appears to work ok, though the two different instances appear to be downloading the same file at the same time.
How does the new "locking" work?