Bug 1886706 - zchunk errors with ftp:// repos
Summary: zchunk errors with ftp:// repos
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 33
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: amatej
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2020-10-09 07:32 UTC by Martin Pitt
Modified: 2021-03-05 19:16 UTC (History)
9 users (show)

Fixed In Version: dnf-4.6.1-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-03-05 19:16:50 UTC
Type: Bug

Attachments (Terms of Use)

Description Martin Pitt 2020-10-09 07:32:42 UTC
Description of problem:

dnf seems generally broken with ftp:// repos, due to tripping over zchunk errors. I know they are slowly falling out of fashion, but anaconda still tests it (and fails).

Version-Release number of selected component (if applicable):


How reproducible: Always

Steps to Reproduce:
1. podman run -it --rm fedora:33
   This is just to get a clean and throwaway environment. You can also do this in a VM, mock, etc.

2. Edit /etc/yum.repos.d/fedora.repo to enable FTP URL:

name=Fedora $releasever - $basearch

  I tried this with other FTP mirrors, same result.

3. dnf update

Actual results: Fails with

Fedora 33 - x86_64                                                                                      410 kB/s | 2.6 MB     00:06
Errors during downloading metadata for repository 'fedora':
  - At least one of the zchunk checksums doesn't match in ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/c316863ea4d1f63ab24c8dcb68582b638b0baa3bb806da9e2e5574b3e16fed4b-primary.xml.zck
  - At least one of the zchunk checksums doesn't match in ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/78112cfdca2804cb49fbc0e07bad08c5b39f50628ff29a8345e8015e2c2c28bb-filelists.xml.zck
Error: Failed to download metadata for repo 'fedora': Yum repo downloading error: Downloading error(s): repodata/c316863ea4d1f63ab24c8dcb68582b638b0baa3bb806da9e2e5574b3e16fed4b-primary.xml.zck - Cannot download, all mirrors were already tried without success; repodata/78112cfdca2804cb49fbc0e07bad08c5b39f50628ff29a8345e8015e2c2c28bb-filelists.xml.zck - Cannot download, all mirrors were already tried without success

Expected results: dnf can download repository.

Additional info:

This is similar to bug 1851841 and bug 1830512, but more along the lines of "disable zchunk for FTP". I don't have the first idea what zchunk does, but it may depend on http?

This can be worked around with adding zchunk=false to dnf.conf. However, I don't see how to inject that into kickstart [1]?

[1] https://docs.fedoraproject.org/en-US/fedora/rawhide/install-guide/appendixes/Kickstart_Syntax_Reference/

Comment 1 Daniel Mach 2020-10-12 11:27:43 UTC
Librepo should prioritize http(s) mirrors when zchunk is on.
If no http(s) mirror is available, then librepo probably needs a new code path to download the whole zck file.

Comment 2 amatej 2020-10-29 08:07:00 UTC
I have created a PR which should fix this: https://github.com/rpm-software-management/librepo/pull/206
And here are some tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/903

Comment 3 Fedora Update System 2021-03-02 16:57:02 UTC
FEDORA-2021-4d7356a470 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-4d7356a470

Comment 4 Fedora Update System 2021-03-03 23:52:24 UTC
FEDORA-2021-4d7356a470 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-4d7356a470`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-4d7356a470

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-03-05 19:16:50 UTC
FEDORA-2021-4d7356a470 has been pushed to the Fedora 33 stable repository.
If problem still persists, 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.