Red Hat Bugzilla – Bug 189828
yum always uses the network even when "-C" specified
Last modified: 2014-01-21 17:54:24 EST
Description of problem:
Yum will /always/ issue HTTP requests to the network, even when "-C" is
specified. Depending upon whether mirrors are configured, this may or may not
allow for offline use, but it always slows done access to cached use only.
Version-Release number of selected component (if applicable):
Yum in FC5 and recent rawhide builds
Steps to Reproduce:
1. use yum
Yum wants to hit repos
Yum should not do that
Tested on ppc rawhide installs and a FC5 fresh install on vmware.
is this install using the mirrorlist= directive in your /etc/yum.repos.d/*.repo
Created attachment 128191 [details]
A copy of the yum repositories on an example box where yum fails to honor "-C".
This is a rawhide box, same problem occurs on an FC5 box with a fresh install.
So, according to those configs it is using mirrorlists. Test this for me:
comment out the mirrorlists - just use the baseurl and see if it still contacts
When I make these changes on a virgin FC5 install, it no longer hits the network.
However, FC5 seems to ship with mirrorlist being set for the repos and no
baseurl. In that case, yum is definately not behaving correctly when specifying
This is to say nothing of the speed - this box takes 34.363 seconds to run "yum
-C list kernel" whereas another two boxes can take anything from 1-2 minutes.
something else is going on here.
if it takes 34s for that to occur then something else is broken.
on my 1.2ghz laptop it only takes 5s for the same command
and on my 3.4ghz desktop it takes 2.2s for that command.
I've often found yum to be "slow". Fedora is running here on 2 x Powerbooks with
rawhide and a vmware install on x86 - each of those takes similar amounts of
time, although the vmware host is faster. On the ppc platforms, I'm getting
typically 40 seconds to 1 minute and most of that is lost in IO.
I did mention the strace output examples above. I'd love it if you had some
Hmmm... apparently the strace links aren't there. Here are two example runs:
http://www.printk.net/~jcm/yum.strace2 <--- rawhide
http://www.printk.net/~jcm/yum_fc5.strace2 <--- FC5
These result in network traffic, they were made last night before changing
1. strace output isn't all that useful in this situation
2. you have your answer
It is not possible to disable all network access when using mirrorlists in the
current code. Period.
With regard to the speed you're seeing I can't really tell you where the time is
being lost but I'd look hard at your network connection b/c I can't recreate
this even on machines with a slow connection to the net.