Bug 1476701 - reposync shows full traceback
reposync shows full traceback
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Valentina Mukhamedzhanova
BaseOS QE Security Team
Depends On:
  Show dependency treegraph
Reported: 2017-07-31 04:47 EDT by Jiri Vavra
Modified: 2018-03-16 11:07 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiri Vavra 2017-07-31 04:47:27 EDT
Description of problem:
When some error happens with reposync util, long traceback is shown

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

How reproducible:

Steps to Reproduce:
1. set some repository which has e.g. broken link in baseurl
2. run reposync # reposync --repoid=epel
3. see traceback 

Actual results:

# reposync --repoid=epel
Traceback (most recent call last):
  File "/bin/reposync", line 343, in <module>
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 897, in _getMetalink
    raise Errors.RepoError, msg
yum.Errors.RepoError: Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

Expected results:
Short error output is expected, this is how it looks in RHEL 6

# reposync --repoid=epel
Error setting up repositories: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

Additional info:
Comment 2 Michal Domonkos 2018-03-16 11:07:35 EDT
Right, this is because we don't handle exceptions from the my.doRepoSetup() call which leads to fetching the metadata on RHEL-7, see this commit:

commit a522869c21768d53c3861be9c0a2394a3930ad66
Author: Zdeněk Pavlas <zpavlas@redhat.com>
Date:   Wed Mar 28 15:59:26 2012 +0200

    retrieveAllMD(): parallel metadata downloading
    Metadata are downloaded in parallel just before postreposetup.
    This implements the reverting behavior.

The fix should be quite trivial.

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