Bug 1289010

Summary: dnf fails to try other mirrors when one mirror fails
Product: [Fedora] Fedora Reporter: Josh Chia <joshchia>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jmracek, joshchia, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-15 12:02:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fedora-updates.repo none

Description Josh Chia 2015-12-07 08:45:58 UTC
Description of problem:
I have two baseurl entries in my fedora.repo & fedora-updates.repo, in the fedora and updates sections respectively, one for download.fedoraproject.org and another for mirrors.ustc.edu.cn, no metalink. When I dnf clean all and then dnf update, I get an error, but if I comment out the mirrors.ustc.edu.cn in the fedora-updates.repo, there is no error.

If the failure is due to the mirrors.ustc.edu.cn being in the bad state, dnf client should try a good mirror instead of just failing.


Version-Release number of selected component (if applicable):
$ rpm -qa |grep -i dnf
python-dnf-1.1.4-2.fc22.noarch
dnf-yum-1.1.4-2.fc22.noarch
dnf-1.1.4-2.fc22.noarch
dnf-plugins-core-0.1.14-1.fc22.noarch
dnf-conf-1.1.4-2.fc22.noarch
python-dnf-plugins-core-0.1.14-1.fc22.noarch

Steps to Reproduce:
1. Edit the two repo files to have those two baseurls and no metalink
2. dnf clean all
3. dnf update
4. Get an error.
5. Comment out the mirrors.ustc.edu.cn baseurl from fedora-updates.repo
6. Repeat 2-3 and see success.

Actual results:
Fedora 22 - x86_64                                                                                                                                                                                                                                                                           6.8 MB/s |  41 MB     00:06
Error: Failed to synchronize cache for repo 'updates' from 'http://mirrors.ustc.edu.cn/fedora/linux/updates/22/x86_64/': Yum repo downloading error: Downloading error(s): repodata/3557cd282ff3a9ed489b9a469bd9ca23771fb67d01d6121e8e889417d57b51ee-filelists.xml.gz - Cannot download, all mirrors were already tried without success; repodata/3b28448c0858d4aeef04a14167f9193ea3d5231e2bc017313087f192f027c906-prestodelta.xml.xz - Cannot download, all mirrors were already tried without success; repodata/e825b219e5e1e2f55c25abe11776abf557405dd48be8bc95b8d4a80f9b90db4a-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/59e80bc0f0034efdcd6464af8c420174e5f64663f6c339c452123f719b742326-updateinfo.xml.xz - Cannot download, all mirrors were already tried without success


Expected results:
dnf update succeeds, even if mirrors.ustc.edu.cn is in a bad state but download.fedoraproject.org is in a good state.

When I did the experiment, commenting out mirrors.ustc.edu.cn caused dnf update to succeed, so dnf update is applying faulting logic for failover to a good mirror (download.fedoraproject.org).

Comment 1 Josh Chia 2015-12-07 08:47:50 UTC
As of this writing, the contents of http://mirrors.ustc.edu.cn/fedora/linux/updates/22/x86_64/repodata/:
02de6198cf72db215a1f0102f86454c5da08d0d9312844e..> 06-Dec-2015 02:56              235480
87264b87ffa673b5ec89e25bc8481723c7df65a28399de1..> 06-Dec-2015 02:56             1722592
repomd.xml                                         06-Dec-2015 02:56                4848

Comment 2 Jaroslav Mracek 2015-12-10 15:20:11 UTC
I am sorry, but I cannot reproduce it. Please could you provide .repo file that caused a problem, and repo file that working correctly. Thanks a lot.

Comment 3 Josh Chia 2015-12-10 22:46:08 UTC
Created attachment 1104512 [details]
fedora-updates.repo

This config didn't work earlier. After I commented out the ustc.edu.cn line, the problem went away.

Comment 4 Josh Chia 2015-12-10 22:50:30 UTC
Sorry, I think I gave some confusing info earlier, so I've attached the actual config file.

The problem is dependent on the state of the mirrors. I can't repro it now, but the point is that if ustc.edu.cn was failing, it seems that dnf should have just failed over to the metalink.

Comment 5 Jaroslav Mracek 2015-12-14 12:52:44 UTC
Thank you very much for your information. We think that yours problem was that originally you had two times baseurl= and it is a problem. If you have two links, uou have to make baseurl=URL1,URL2 .
We hope that it helps

Comment 6 Josh Chia 2015-12-15 11:23:21 UTC
No, the fedoraproject.org baseurl is always commented out. You can treat the .repo file I submitted as not having that line at all. The baseurl line in question is the one for ustc.edu.cn. Without commenting out that line, dnf failed. With that line commented out, dnf succeeded.

Comment 7 Josh Chia 2015-12-15 12:02:55 UTC
Ignore last comment. I typed too fast.