Red Hat Bugzilla – Bug 1289010
dnf fails to try other mirrors when one mirror fails
Last modified: 2015-12-15 07:02:55 EST
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
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.
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
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).
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
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.
Created attachment 1104512 [details]
This config didn't work earlier. After I commented out the ustc.edu.cn line, the problem went away.
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.
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
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.
Ignore last comment. I typed too fast.