Bug 1669247 - dnf does not refresh expired repository metadata
Summary: dnf does not refresh expired repository metadata
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-24 17:57 UTC by Marek Marczykowski
Modified: 2019-03-21 14:40 UTC (History)
9 users (show)

Fixed In Version: dnf-4.2.1-1.fc30 dnf-4.2.1-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-19 19:38:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Marczykowski 2019-01-24 17:57:06 UTC
Description of problem:

fedora-updates repository have `metadata_expire=6h`, but dnf still use that metadata even if it's older than that. Running `dnf clean expire-cache` doesn't help either.

BTW it affects saltstack, as `dnf clean expire-cache` is exactly what salt tries to do when looking for updates: https://github.com/saltstack/salt/blob/9c81df64c19e1e25cd9cd2be570d116e2a886604/salt/modules/yumpkg.py#L1108

Version-Release number of selected component (if applicable):
dnf-4.0.9-2.fc29.noarch
python3-dnf-4.0.9-2.fc29.noarch
python3-hawkey-0.22.3-1.fc29.x86_64
python3-libdnf-0.22.3-1.fc29.x86_64



How reproducible:
always

Steps to Reproduce:
1. dnf clean expire cache
2. dnf -d 10 list upgrades
3.

Actual results:

Cleaning data: expire-cache
Cache was expired
0 files removed
Cleaning up.

(...)
repo: using cache for: updates
not found other for: Fedora 29 - x86_64 - Updates
not found modules for: Fedora 29 - x86_64 - Updates
updates: using metadata from Fri Jan 11 05:04:07 2019.
(...)

and no updates are listed

Expected results:

Outdated cache should not be used and should be automatically refreshed. 

Additional info:

Adding `--refresh` to `dnf list upgrades` does help, but it shouldn't be needed.

The same applies to Fedora 28 too.

Comment 1 Marek Blaha 2019-01-30 07:44:52 UTC
This is probably duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1648274 (fix for this bug was not released to F29 yet, only to rawhide).
Please are you able to reproduce the bug with dnf from our nightly copr repo?
https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf-nightly/

Comment 2 Marek Marczykowski 2019-02-01 01:32:14 UTC
#1648274 looks similar, but I think it may be separate issue.
I've tried packages from that dnf nightly copr repo (dnf-4.1.0-0.14gbfe98dc1.fc29.noarch among other packages), but the bug still is there.

Doing `dnf list updates` still does not refresh repository metadata, even after `dnf clean expire-cache`. But `dnf repoinfo updates` and `dnf upgrade` do. So, it may be specific to this particular command.

Comment 3 Marek Blaha 2019-02-01 06:50:28 UTC
True. I missed that command is not `update`, but `list updates`, which really does not demand fresh metadata.

Comment 5 Fedora Update System 2019-03-13 13:41:54 UTC
dnf-plugins-core-4.0.6-1.fc29 libdnf-0.28.0-1.fc29 libcomps-0.1.11-1.fc29 createrepo_c-0.12.2-1.fc29 librepo-1.9.5-1.fc29 dnf-4.2.1-1.fc29 dnf-plugins-extras-4.0.4-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-a03be2cebe

Comment 6 Fedora Update System 2019-03-13 13:42:48 UTC
dnf-plugins-core-4.0.6-1.fc30 libdnf-0.28.0-1.fc30 libcomps-0.1.11-1.fc30 createrepo_c-0.12.2-1.fc30 librepo-1.9.5-1.fc30 dnf-4.2.1-1.fc30 dnf-plugins-extras-4.0.4-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 7 Fedora Update System 2019-03-13 15:37:06 UTC
createrepo_c-0.12.2-1.fc30, dnf-4.2.1-1.fc30, dnf-plugins-core-4.0.6-1.fc30, dnf-plugins-extras-4.0.4-1.fc30, libcomps-0.1.11-1.fc30, libdnf-0.28.0-1.fc30, librepo-1.9.5-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 8 Fedora Update System 2019-03-14 18:51:36 UTC
createrepo_c-0.12.2-1.fc29, dnf-4.2.1-1.fc29, dnf-plugins-core-4.0.6-1.fc29, dnf-plugins-extras-4.0.4-1.fc29, libcomps-0.1.11-1.fc29, libdnf-0.28.0-1.fc29, librepo-1.9.5-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-a03be2cebe

Comment 9 Fedora Update System 2019-03-15 13:09:40 UTC
createrepo_c-0.12.2-1.fc30 dnf-4.2.1-1.fc30 dnf-plugins-core-4.0.6-1.fc30 dnf-plugins-extras-4.0.4-1.fc30 libcomps-0.1.11-1.fc30 libdnf-0.28.0-1.fc30 librepo-1.9.5-1.fc30 swid-tools-0.7.3-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 10 Fedora Update System 2019-03-16 20:17:35 UTC
createrepo_c-0.12.2-1.fc30, dnf-4.2.1-1.fc30, dnf-plugins-core-4.0.6-1.fc30, dnf-plugins-extras-4.0.4-1.fc30, libcomps-0.1.11-1.fc30, libdnf-0.28.0-1.fc30, librepo-1.9.5-1.fc30, swid-tools-0.7.3-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 11 Fedora Update System 2019-03-19 19:38:45 UTC
createrepo_c-0.12.2-1.fc30, dnf-4.2.1-1.fc30, dnf-plugins-core-4.0.6-1.fc30, dnf-plugins-extras-4.0.4-1.fc30, libcomps-0.1.11-1.fc30, libdnf-0.28.0-1.fc30, librepo-1.9.5-1.fc30, swid-tools-0.7.3-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2019-03-20 22:13:06 UTC
createrepo_c-0.12.2-1.fc29, dnf-4.2.1-1.fc29, dnf-plugins-core-4.0.6-1.fc29, dnf-plugins-extras-4.0.4-1.fc29, libcomps-0.1.11-1.fc29, libdnf-0.28.0-1.fc29, librepo-1.9.5-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2019-03-21 14:40:43 UTC
createrepo_c-0.12.2-1.fc29, dnf-4.2.1-1.fc29, dnf-plugins-core-4.0.6-1.fc29, dnf-plugins-extras-4.0.4-1.fc29, libcomps-0.1.11-1.fc29, libdnf-0.28.0-1.fc29, librepo-1.9.5-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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