Bug 312781 - yum gets stuck by mirrorlist.txt being bad
yum gets stuck by mirrorlist.txt being bad
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F8Target
  Show dependency treegraph
 
Reported: 2007-09-29 19:58 EDT by Scott J Henson
Modified: 2014-01-21 17:59 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-02 12:49:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Scott J Henson 2007-09-29 19:58:11 EDT
Description of problem:
When I was messing with my router (to install dd-wrt) I some how triggered a yum
update.  I either yum install tftp or updatesd did its own thing.  Durring this
yum got stuck with the following error.

shenson@localhost:~$ sudo yum update
Loading "refresh-updatesd" plugin
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <html>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <head>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <meta
http-equiv="Content-Type">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <meta
http-equiv="Pragma" content="no-cache">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <meta
http-equiv="Cache-Control" content="no-cache">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <meta
equiv="Expires" content="Thu, 01 Dec 1994 16:00:00 GMT">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <script
language="JavaScript">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <!-- 
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - function
Goto()
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - {
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -  if (self
!= top) top.location.href = self.location.href;
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - 
location.href =
"http://192.168.11.1/cgi-bin/cgi?req=frm&frm=top_wizard_auto_detect.html";
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - }
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - //-->
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </script>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </head>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <body
bgcolor="#FFFFFF" text="#000000" onLoad="Goto();">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <noscript>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <a
href="http://192.168.11.1/cgi-bin/cgi?req=frm&frm=top_wizard_auto_detect.html"><b>Click
here</b></a>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </noscript>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </body>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </html>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <!--  -->
Error: Cannot retrieve repository metadata (repomd.xml) for repository:
development. Please verify its path and try again

Version-Release number of selected component (if applicable):
shenson@localhost:~$ yum info yum
Loading "refresh-updatesd" plugin
Installed Packages
Name   : yum
Arch   : noarch
Version: 3.2.5
Release: 4.fc8
Size   : 1.6 M
Repo   : installed

Latest f8t2 as of Friday Sept 28

How reproducible:

Once yum was stuck it displayed that error message whenever it tried to hit the
repo.  I don't know if I can trigger the bug again, ifs its needed I'll try.

Steps to Reproduce:
1. Connect to a network that redirects all http stuff to some page that you
don't actually want
2. yum install tftp or yum update
3. get connected properly to the internets
4. yum update once more
  
Actual results:

The above error message is displayed.  

Expected results:

yum installs the requested package or updates the system

Additional info:

A yum clean all took care of the problem for me.  Apparently the html page above
was stored in /var/cache/yum/development/mirrorlist.txt.  I don't think think
yum should break itself by just using yum itself.  I think yum should kill the
mirrorlist.txt if its giving bad info.  That or offer a helpful error message
suggesting yum clean all if things persist.  

Thank you.
Comment 1 Seth Vidal 2007-10-02 12:48:42 EDT
Committed a fix in yum upstream - essentially if all the urls for a repo are
bogus  we unlink the cached mirrorlist so yum will get it again the next time.
Seems the safest thing and it will handle little arbitrary issues.
Comment 2 Scott J Henson 2007-10-04 09:55:11 EDT
Thanks, quick question.  Does it do this right after its grabbed the list or on
the next run?  It would make more sense for it to check the new mirrorlist
before caching it.  If the mirrorlist it just grabbed is bogus it could then
throw an error telling the user there is something wrong with the repo or their
network connection.
Comment 3 Seth Vidal 2007-10-04 10:06:36 EDT
the mirrorlist itself is just a simple text file. There's no way to look at the
mirrorlist and know if it is good or bad before we look at each url. So, grab
the mirrorlist, save it to a cache file, then we parse it. In the current code
there's just not a good way to do otherwise w/o a lot of moving things around.
So the unlink and then the error is better.
Comment 4 Fedora Update System 2007-10-08 11:00:28 EDT
yum-3.2.6-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'
Comment 5 Fedora Update System 2007-10-10 15:33:45 EDT
yum-3.2.6-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'

Note You need to log in before you can comment on or make changes to this bug.