Bug 1230508 - dnf uses outdated metadata
Summary: dnf uses outdated metadata
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1293910
TreeView+ depends on / blocked
 
Reported: 2015-06-11 05:18 UTC by Ralf Corsepius
Modified: 2015-12-23 13:31 UTC (History)
15 users (show)

Fixed In Version: 1.2.13-2.fc22 mock-1.2.13-2.fc21 mock-1.2.13-2.el7 mock-1.2.13-2.el6
Clone Of:
: 1293910 (view as bug list)
Environment:
Last Closed: 2015-12-23 13:22:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
root.log showing dnf travering all mirrors (40.22 KB, text/plain)
2015-06-11 05:18 UTC, Ralf Corsepius
no flags Details

Description Ralf Corsepius 2015-06-11 05:18:42 UTC
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.

Comment 1 Honza Silhan 2015-07-24 12:48:43 UTC
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.

Comment 2 Miroslav Suchý 2015-08-19 14:23:30 UTC
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]

Comment 3 Fedora Update System 2015-09-16 20:02:09 UTC
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053

Comment 4 Fedora Update System 2015-09-16 20:05:07 UTC
mock-1.2.13-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054

Comment 5 Fedora Update System 2015-09-16 20:07:06 UTC
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056

Comment 6 Fedora Update System 2015-09-16 20:08:48 UTC
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

Comment 7 Fedora Update System 2015-09-16 20:09:56 UTC
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

Comment 8 Fedora Update System 2015-09-17 21:30:17 UTC
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

Comment 9 Fedora Update System 2015-09-18 05:21:11 UTC
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

Comment 10 Fedora Update System 2015-09-18 16:24:33 UTC
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

Comment 11 Fedora Update System 2015-09-19 03:20:06 UTC
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

Comment 12 Fedora Update System 2015-09-19 03:21:55 UTC
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

Comment 13 Fedora Update System 2015-09-23 04:09:18 UTC
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.

Comment 14 Fedora Update System 2015-09-24 08:22:54 UTC
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.

Comment 15 Fedora Update System 2015-10-05 22:50:52 UTC
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.

Comment 16 Fedora Update System 2015-10-07 03:05:21 UTC
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.

Comment 17 Fedora Update System 2015-10-07 04:05:30 UTC
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.

Comment 18 Vít Ondruch 2015-11-10 13:26:39 UTC
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.

Comment 19 Fedora End Of Life 2015-12-02 13:39:39 UTC
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.

Comment 20 Miroslav Suchý 2015-12-23 13:22:54 UTC
This is indeed happening, however this is buggy DNF behaviour. So I will close this one and clone this bug to DNF.


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