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

James Antill james at fedoraproject.org
Thu Jan 16 15:26:40 UTC 2014


On Thu, 2014-01-16 at 04:29 -0500, Zdenek Pavlas wrote:
> > >  yum-cron/yum-cron-hourly.service  |  6 +++---
> > >  yum-cron/yum-cron-hourly.sysvinit | 10 +++++-----
> > >  yum-cron/yum-cron.sysvinit        |  4 ++--
> > >  yum-cron/yum-hourly.cron.sh       |  2 +-
> > >  4 files changed, 11 insertions(+), 11 deletions(-)
> > 
> >  I understand the desire here, we don't want them to randomly "kill"
> > each other by being running when the other wants to run ... but won't
> > that happen anyway due to them mostly holding the yum lock at the same
> > time? (big package downloads would be the significant exception here).
> > 
> >  Might be better to wait for N minutes checking the lock and keep using
> > the same lock?
> 
> No, yum-cron, yum-cron-hourly, and yum itself should still share the sam
> yum.pid lockfile.. The wording is unfortunate.. I ment these lockfiles:

 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.

 So I guessed it might be better to share both locks, but have some kind
of loop on the service lock so that if daily and hourly go off at the
same time one of them won't die. 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).



More information about the Yum-devel mailing list