Created attachment 1037505 [details] root.log showing dnf travering all mirrors Description of problem: When building a package for rawhide in mock on fc21, dnf traversed all available fedora mirrors to d/l a package and in the end failed to find it and gave up (cf. attachment). An off-list discussion of this breakdown with Kevin F. resulted into this suspected cause: dnf underneath of mock is using outdated metadata, which does not reflect the contents of the available repositories. => when a package has been removed from the repository (here: rawhide), dnf tries to d/l a package which is not present on any repository anymore and thus fails. Version-Release number of selected component (if applicable): dnf-0.6.4-5.fc21.noarch How reproducible: Probably deterministing. Steps to Reproduce: If suspicions hold, it should be reproducable by these steps (untested): 1. Set up a repository and insert a package "foo-1.0*rpm" into it (run createrepo). 2. Add this repository to an active installation and run "dnf --refresh update" 3. Remove "foo-1.0*rpm" from the repository or replace it with "foo-2.0*rpm" (run createrepo). 4. run "dnf install foo" Actual results: dnf traverses all mirrors to find a package but fails to find it. Expected results: Function. Additional info: - Real cause of this issue seems to be dnf not validating its cached metadata against the metadata provided by mirrors/mirrorlist. This could be achieved by comparing a mirror's repomd.xml against dnf's cached repomd.xml. Another approach could be to let dnf "refresh" its metadata when it fails to find a package. - Trigger of this issue in my case seems to be the fact dnf underneath of mock is using "metadata_expire=48h" (the implicit default). With rawhide being updated frequently (According to Kevin typically at a rate of ca. 24h) this introduces a high probability to hit this issue with rawhide mock-environments. - This issue will occasionally show with every repository. It's only the fact that rawhide is being updated frequently, which makes tripping over this issue in rawhide mock-environments more likely than with other repositories.
In makes sense to me for mock to have in dnf default config set "metadata_expire=0". DNF could (and will) mark metadata expired when packages are unreachable but this would require run DNF again. Which in mock build would be clumsy.
I put metadata_expire=0 into F23 and rawhide configs. I did not put it into all target (which still use Yum) as I believe that yum behave slightly different and I do not want to bring unnecessary regression. Commit: * e73d227 (origin/devel) redownload metadata if they changed on server [RHBZ#1230508]
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
mock-1.2.13-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
mock-1.2.13-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114
mock-1.2.13-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
Please revert this change! This causes DNF to download the metadata again and again. This produces unnecessary traffic and what is worse, it causes unnecessary delays. This metadata download happens twice prior the build even starts! I understand that the original report might be an issue, but I still prefer to have fast builds without unnecessary traffic and use "--scrub dnf-cache" once in a while, when this happens.
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 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 bug. Thank you for reporting this bug and we are sorry it could not be fixed.
This is indeed happening, however this is buggy DNF behaviour. So I will close this one and clone this bug to DNF.