On Tue, 2010-07-20 at 14:30 -0400, James Antill wrote:
> On Tue, 2010-07-20 at 14:01 -0400, JohnS wrote:
> > The exact problem is yum can't get a lock on the meta data db in an nfs
> > root.  I have browsed the yum list and seen the same problems and no fix
> > for it yet or really mention of even if it could be fixed.
> 
>  Define "locking".
> 
>  Atm. yum does:
> 
> 1. When generating the repodata sqlite DBs sqlite will automatically
> lock those. This is _per_ DB though, so does not really do anything
> useful for yum. This also requires the repodata only ships .xml data,
> which isn't best practice.
> 
> 2. When reading the repodata sqlite DBs I _think_ sqlite takes read-only
> locks on the DB ... against this doesn't really help us, and if we
> haven't turned it off already it's very plausible that we will.

Should only need row locking?  Instead of the whole DB.

> 3. When reading/writing the history DB we have sqlite locking there.
> This should protect the sqlite DB, but doesn't do much for yum itself
> (esp. downloading/updating repodata and packages).

Sounds right to me for the that db.  I come from an environment where we
lock the whole History/Logging Db with the inserting table unlocked and
there are no updates on the db only new inserts

> 4. When we are running _as root_, we create /var/run/yum.pid as a "lock
> file". This is an old style "dot locking" mechanism though (but using
> the actual filename). This serializes all root yum instances on a single
> machine.
> 
> ...we have plans to change #4 so that it'll work with normal users as
> well as root (ie. use a file based on cachedir).

That's what I need to have a common NFS builder root for multi machine
access on need.

>  This will _help_ your situation of running as root from multiple
> machines, assuming we move the lock file for root too, as each machine
> will be able to see the lock file if you just share /var/cache/yum. I
> doubt we'll be guaranteeing it works though, just as we don't now (lots
> of work from other people may persuade us :).

To be exact I want to NFS /var/Plague and that is not possible atm where
I have the rest of it NFSed.

>  In general for people who want this, I always recommend you read:
> 
> http://yum.baseurl.org/wiki/YumMultipleMachineCaching

Read the above link and thanks for it.  Is there any kind a pre release
code for whats in working progress that will build under RHEL 5/CentOS 5
or patches to the current yum version in them?

John

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to