Bug 1476701

Summary: reposync shows full traceback
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Vavra <jivavra>
Component: yum-utilsAssignee: Michal Domonkos <mdomonko>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: emrakova, ksrot, mdomonko, packaging-team-maint
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-utils-1.1.31-52.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:13:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1630909, 1630918    

Description Jiri Vavra 2017-07-31 08:47:27 UTC
Description of problem:
When some error happens with reposync util, long traceback is shown

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

How reproducible:
100%

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 15:07:35 UTC
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>
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.

Comment 3 Michal Domonkos 2018-10-16 13:47:46 UTC
*** Bug 1482899 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2019-08-06 13:13:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2288