RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1399235 - yum reposync fails to download rpms that already exist in the repo
Summary: yum reposync fails to download rpms that already exist in the repo
Keywords:
Status: CLOSED DUPLICATE of bug 1375514
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-28 15:31 UTC by Nadav Goldin
Modified: 2017-09-11 11:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1332441
Environment:
Last Closed: 2017-01-11 17:08:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nadav Goldin 2016-11-28 15:31:52 UTC
+++ This bug was initially created as a clone of Bug #1332441 +++

Description of problem:
When running reposync for multiple during multiple days downloading rpms to the same dir (to keep a local copy up of the repos up to date) I'm seeing that from time to time it starts failing to download some rpm with the error:

python-ioprocess-0.15.0-4.el7. FAILED                                          
python-ioprocess-0.15.0-4.el7.noarch: [Errno 256] No more mirrors to try.


Version-Release number of selected component (if applicable):
# rpm -qa yum-utils
yum-utils-1.1.31-508.fc23.noarch


How reproducible:
You can use this yum config:

# cat test.repo 
[main]
reposdir=/etc/reposync.repos.d
retries=3
debuglevel=10
rpmverbosity=debug
[epel-el7]
name=EPEL repo
baseurl=https://dl.fedoraproject.org/pub/epel/7/x86_64/
enabled=1
gpgcheck=0


Then run reposync:

 "reposync" "--config=test.repo" "--download_path=/tmp/reposync" "--newest-only" "--delete" "--cachedir=/tmp/reposync_cache"  "--repoid=epel-el7"


If eventually (usually the day after) reposync will start failing, even though it has the rpm there:

# tree /tmp/reposync
/tmp/reposync
└── epel-el7
    ├── g
    ├── i
    ├── l
    ├── m
    ├── p
    │   └── python-ioprocess-0.15.0-4.el7.noarch.rpm
    └── s

If you remove the rpm manually, it redownloads it and continues successfully.

Steps to Reproduce:
1.
2.
3.

Actual results:
Reposync complains about being unable to download from any mirrors and fails

Expected results:
Reposync succeeds, either 

Additional info:


The old rpm:

 rpm -qpi /tmp/reposync/epel-el7/p/python-ioprocess-0.15.0-4.el7.noarch.rpm 
warning: /tmp/reposync/epel-el7/p/python-ioprocess-0.15.0-4.el7.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 61e8806c: NOKEY
Name        : python-ioprocess
Version     : 0.15.0
Release     : 4.el7
Architecture: noarch
Install Date: (not installed)
Group       : System Environment/Base
Size        : 55223
License     : GPLv2+
Signature   : RSA/SHA1, Thu 17 Dec 2015 04:48:02 PM CET, Key ID 7aebbe8261e8806c
Source RPM  : ioprocess-0.15.0-4.el7.src.rpm
Build Date  : Fri 11 Dec 2015 09:57:17 AM CET
Build Host  : c1bg.rdu2.centos.org
Relocations : (not relocatable)
Packager    : CBS <cbs>
Vendor      : CentOS
URL         : https://github.com/oVirt/ioprocess
Summary     : Python bindings for ioprocess
Description :
Python bindings for ioprocess


The rpm it's replaced by once you remove it:
[root@dev-20 ovirt-system-tests]# rm /tmp/reposync/epel-el7/p/python-ioprocess-0.15.0-4.el7.noarch.rpm
rm: remove regular file ‘/tmp/reposync/epel-el7/p/python-ioprocess-0.15.0-4.el7.noarch.rpm’? y
[root@dev-20 ovirt-system-tests]# "reposync" "--config=test.repo" "--download_path=/tmp/reposync" "--newest-only" "--delete" "--cachedir=/tmp/reposync_cache"  "--repoid=epel-el7" 

Yum-utils package has been deprecated, use dnf instead.
See 'man yum2dnf' for more information.


Config time: 0.007
repo time: 0.001
Setting up Package Sacks
pkgsack time: 0.364
rpmdb time: 0.0000.15.0-4.el7.noarch.rpm                                                                  0% [                                                                                               ]  0.0 B/s |    0 B  --:--:-- ETA 
python-ioprocess-0.15.0-4.el7.noarch.rpm                                                                                                                                                                                |  23 kB  00:00:01     
[root@dev-20 ovirt-system-tests]# rpm -qpi /tmp/reposync/epel-el7/p/python-ioprocess-0.15.0-4.el7.noarch.rpm 
warning: /tmp/reposync/epel-el7/p/python-ioprocess-0.15.0-4.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Name        : python-ioprocess
Version     : 0.15.0
Release     : 4.el7
Architecture: noarch
Install Date: (not installed)
Group       : System Environment/Base
Size        : 55223
License     : GPLv2+
Signature   : RSA/SHA256, Sun 29 Nov 2015 07:44:25 PM CET, Key ID 6a2faea2352c64e5
Source RPM  : ioprocess-0.15.0-4.el7.src.rpm
Build Date  : Sun 29 Nov 2015 03:37:09 PM CET
Build Host  : buildhw-09-nfs.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://github.com/ficoos/ioprocess
Summary     : Python bindings for ioprocess
Description :
Python bindings for ioprocess

--- Additional comment from Nadav Goldin on 2016-11-21 11:07:16 EST ---

Hi, any news on this?

--- Additional comment from Valentina Mukhamedzhanova on 2016-11-22 07:10:33 EST ---

(In reply to Nadav Goldin from comment #2)
> Hi, any news on this?

yum and yum-utils are discontinued on Fedora. Fedora users should be using dnf at this point. If you would like to propose this BZ for fixing on RHEL, please change the Product to RHEL. Otherwise, I would suggest closing this BZ.

--- Additional comment from Fedora End Of Life on 2016-11-25 03:55:13 EST ---

This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 1 Nadav Goldin 2016-11-28 16:06:20 UTC
I am able to reproduce this issue locally with createrepo/reposync:
Assume 'remote_repo' serves a RPM named 'dummy-something.rpm' with 'Release=1' field.
Run reposync, then recreate the RPM with the exact same spec file,
except 'Release=2' field, keeping the exact same filename and rebuild
the yum repository(with createrepo). Running reposync again will fail with:
[Errno 256] No more mirrors to try.

I know its not the best practice to keep the same RPM filename for different
releases, however MANY packages do so(like python-ioprocess). Moreover,
the error message indicates nothing of the true error.

I think the expected should be that the latest RPM(the one with 'Release=2' in
the example) should be downloaded, like yum would behave. 


Steps to reproduce locally:

1. create a dummy spec file
cat dummy.spec
>Name: dummy-rpm
Version: 1.0
Release:	1
Summary: dummy summary
License: Public domain

%description
test-reposync-failure
%install
%files
%changelog

2. build the RPM
3. run createrepo on the RPM's directory.

4. run reposync with the local repository
configured(here it is /home/ngoldin/tmp/reposync-bz/remote_repo/el7)

>cat reposync-config.repo
[main]
reposdir=/etc/reposync.repos.d
[test-reposync]
name=test reposync
baseurl=file:///home/ngoldin/tmp/reposync-bz/remote_repo/el7
enabled=1
gpgcheck=0

> reposync --config=reposync-config.repo --download_path=/home/ngoldin/tmp/reposync-bz/local_sync

5. re-generate the rpm with 'Release=2'(and keeping the same filename)
>rpm -qip dummy-rpm-1.0-1.el7.x86_64.rpm
Name        : dummy-rpm
Version     : 1.0
Release     : 2
...
Summary     : dummy summary
Description :
test-reposync-failure

5. Regenerate the local repo with createrepo.

6. Run reposync again and see the failure:

>reposync --config=reposync-config.repo --download_path=/home/ngoldin/tmp/reposync-bz/local_sync

dummy-rpm-1.0-1.el7.x86_64.rp FAILED
...
dummy-rpm-1.0-2.el7.x86_64: [Errno 256] No more mirrors to try.

Comment 3 Michal Domonkos 2017-01-11 17:04:12 UTC
(In reply to Nadav Goldin from comment #1)
> I am able to reproduce this issue locally with createrepo/reposync:
> Assume 'remote_repo' serves a RPM named 'dummy-something.rpm' with
> 'Release=1' field.
> Run reposync, then recreate the RPM with the exact same spec file,
> except 'Release=2' field, keeping the exact same filename and rebuild
> the yum repository(with createrepo). Running reposync again will fail with:
> [Errno 256] No more mirrors to try.

Actually, we seem to never have supported packages with the same filename but different NEVRA, at least not without issues.  So like you said, it's not advisable to use such packages in a yum repo (and, to my knowledge, there's no good reason to do so).  Anyway, if you think we should address this somehow, please consider filing a separate BZ.

Regarding python-ioprocess, I've checked the SRPM as well as the changelog and didn't find anything unusual, could you please elaborate a bit more on this (esp. in what repos did you encounter such packages?)

Comment 4 Michal Domonkos 2017-01-11 17:08:53 UTC
The bug itself (Comment 0) is caused by the reget feature of urlgrabber; yum (called from reposync) considers an existing package file a partial download and tries to resume the download (that's why deleting the file manually fixes that).

We already have such a report, so I'm going to close this as a dupe.

*** This bug has been marked as a duplicate of bug 1375514 ***

Comment 5 Eyal Edri 2017-09-11 11:14:33 UTC
clearing needinfo.


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