Red Hat Bugzilla – Bug 1003637
inst.repo=http://download.fedoraproject.org might end up with "No more mirrors to try"
Last modified: 2015-06-29 08:19:15 EDT
Created attachment 792866 [details]
anadonda error screenshot
Description of problem:
Here's the test case:
In earlier releases, it used to work the same way as yum repo works - it expected that the URL can be a redirect (it is), so it resolved it first (it points to a random mirror), and then operated only on this new URL (the single mirror).
I received this instead:
13:44:18,129 DEBUG packaging: http://download.fedoraproject.org/pub/fedora/linux/development/20/x86_64/os/Packages/o/openssl-1.0.1e-18.fc20.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
It seems that anaconda/yum no longer resolves this redirect, but uses download.fp.o for every request. Of course, that might often result in missing files, because not all mirrors are fully synced all the time. If you get metadata from mirror 1, but download packages from mirror 2, you get these errors.
Of course, this might not happen every time, you have to be "lucky".
Version-Release number of selected component (if applicable):
F20 Alpha TC2 x86_64 netinst
probably just sometimes, I saw this in 2 out of 4 attempts
Steps to Reproduce:
1. boot with inst.repo=http://download.fedoraproject.org/pub/fedora/linux/development/20/x86_64/os/
2. start installation, maybe receive error
the original url is used for all requests
the url is checked first for redirects, the resulting url is used for all requests
I received the error after my disk layout has been modified by Anaconda. That's unfortunate.
I'm not sure how many people is affected, but this repo can be very often used in automated deployments. I very much assume this is used in Beaker in Red Hat. The private mirror is used, if available, otherwise some close public repo is used instead, all automatically using download.fp.o.
Created attachment 792875 [details]
Created attachment 792876 [details]
Created attachment 792877 [details]
Created attachment 792878 [details]
Created attachment 792879 [details]
Created attachment 792880 [details]
Created attachment 792881 [details]
This might and might not be violating https://fedoraproject.org/wiki/Fedora_20_Alpha_Release_Criteria#remote-package-sources and might and might not be considered serious enough to block Alpha/Beta/Final. Proposing for discussion.
I thought that download.fedoraproject.org shouldn't be used for an installation or upgrade source as you end up getting packages from any number of mirrors, doing an implicit mirror lookup every time.
(In reply to Tim Flink from comment #9)
No, not really. It's even in official repo files as baseurl (they are commented out because mirrorlist urls are recommended as default, but it's there):
$ grep baseurl /etc/yum.repos.d/fedora.repo
Yum itself handles this well. The only problem I encountered was with fedup and instrepo (bug 886021), but that was kind of waived. Anaconda used to work correctly before. This is the simplest way to provide a http mirror without actually determining a concrete mirror manually.
Of course, we had a similar issue in AutoQA, because we don't download packages using yum code but manually, but that's not relevant here.
In case I'm mistaken, adding Zdenek Pavlas for an advice.
> 13:44:18,129 DEBUG packaging: http://download.fedoraproject.org/pub/fedora/linux/development/20/x86_64/os/Packages/o/openssl-1.0.1e-18.fc20.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
> It seems that anaconda/yum no longer resolves this redirect..
Please note that 404 is NOT a redirect! urlgrabber/curl in the default configuration handles redirects transparently, so this 404 was probably generated after the redirection.
And yes, download.fedoraproject.org redirects, so this seems to prove that there's nothing wrong with redirect handling..
$ telnet download.fedoraproject.org 80
HEAD /pub/fedora/linux/development/20/x86_64/os/Packages/o/openssl-1.0.1e-18.fc20.x86_64.rpm HTTP/1.1
HTTP/1.1 302 FOUND
Date: Wed, 04 Sep 2013 10:55:06 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Type: text/html; charset=utf-8
Connection closed by foreign host.
When you configure a single baseurl that redirects to 10 mirrors, urlgrabber sees just a single mirror. The default failover method is to try all available mirror, so with a single URL that redirects to a mirror that 404s, we give up immediately.
Probably something like this would help: http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=bfb49e
Reuse mirrors when max_retries > len(mirrors). BZ 765598
I'm not sure that we understand each other. If I use baseurl=download.fp.o during installation, we need to ensure that we use a the same mirror for retrieving metadata and retrieving packages. The 404 indicates that metadata were retrieved from mirror 1, but the openssl package was most probably attempted to be retrieved from mirror 2 (which was not in sync with mirror 1).
I really believe Anaconda (and the included yum) used to resolve download.fp.o first, remember the resulting mirror URL, and then download all metadata & packages from this $URL. Therefore there were no 404 errors. Am I completely wrong, Zdenek?
"302 FOUND" processing is done in curl, and is transparent to urlgrabber/yum/anaconda. If you think that 302 redirects were originally cached, it might be due to:
a) a bug in curl. According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3 clients should NOT cache this.
b) download.fedoraproject.org might have used to send a different cache-control header.
I still don't think we (the client) should 1) handle redirects 2) do it in a non-compliant way.
In that case, I'm removing AlphaBlocker nomination, since this is not a clear-cut bug anymore. If this is not handled inside yum and never was, then there must have been other circumstances causing "correct" behavior (as Zdenek mentions), or I must have been extremely lucky to never see this bug.
I'll try to investigate some more to check F17/F18 anaconda behavior and yum itself behavior.
Now I realized that redirect "caching" involves URLs, not hostnames, and URL obviously changes.. we first ask for repomd.xml, then metadata, then packages.
The location we were redirected previously is thus irrelevant, cached or not. So we're left with two ways to fix this:
a) implement same-mirror retries, and hope that we hit the "right" mirror soon.
b) make the redirect choice at download.fp.o random, but mapping client IPs to mirrors consistently.
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 20 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.