[PATCH 2/3] Make yum-{daily, hourly}.cron.sh use independent lockfiles.

James Antill james at fedoraproject.org
Thu Jan 16 19:28:26 UTC 2014


On Thu, 2014-01-16 at 10:42 -0500, Zdenek Pavlas wrote:
> >  yeh, I know you mean the cron service lock. But if they don't share the
> > service lock then they'll almost immediately hit the yum lock underneath
> > anyway and exit.
> 
> How could that work?  Cron does not use the lock files at all, it can't
> serialize anything.. I'm sure hourly and daily yum-cron jobs have already
> competed for the yum.pid lock. OTOH, random sleep should help a lot there.

 Maybe we are talking past each other.

 Why did you want them to have different service lock files?
 I assumed it was because it was possible for hourly and daily to happen
at the same time, and then the second one to start would see the service
lock file of the other and exit. Which seemed like a fine idea, except
the yum lock will also do the same thing so we need to fix both (or do
nothing).

> > Or we could have the loop inside acquireLock() (the problem here is that 
> > we'd have to be careful we don't stay around forever if someone leaves
> > a root "yum" around).
> 
> Yes, there should be few retries, say 1 minute apart, to reduce the number
> of lock failures.

 Yeh, doing a few retries here seems sane ... just need to be careful
about hourly retrying for too long. 



More information about the Yum-devel mailing list