Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.

Bug 652622

Summary: spacewalk-repo-sync crashes with traceback and problem not visible on WebUI
Product: Red Hat Satellite 5 Reporter: Tomas Lestach <tlestach>
Component: WebUIAssignee: Tomas Lestach <tlestach>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satellite-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 540CC: luc, slukasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-04 10:29:41 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 462714    

Description Tomas Lestach 2010-11-12 06:11:15 EST
Description of problem:
If repository meta data not accessible, spacewalk-repo-sync fails with a traceback. The trouble is, according to WebUI log it looks like it is stucked.

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

How reproducible:
always

Steps to Reproduce:
1. create a repo with not accessible repomd files
2. try to sync the repo to a custom channel
3. check the taskomatic log
4. check the WebUI repo-sync log
  
Actual results:
taskomatic log:
INFO   | jvm 2    | 2010/11/12 09:02:40 | 2010-11-12 09:02:40,531 [DefaultQuartzScheduler_Worker-5] ERROR com.redhat.rhn.manager.satellite.SystemCommandExecutor - Error encountered executing (args=[/usr/bin/spacewalk-repo-sync, --channel, csb6repo, --type, yum])
INFO   | jvm 2    | 2010/11/12 09:02:40 | 2010-11-12 09:02:40,531 [DefaultQuartzScheduler_Worker-5] ERROR com.redhat.rhn.manager.satellite.SystemCommandExecutor - Error message from process: Traceback (most recent call last):
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/bin/spacewalk-repo-sync", line 72, in ?
INFO   | jvm 2    | 2010/11/12 09:02:40 |     sys.exit(abs(main() or 0))
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/bin/spacewalk-repo-sync", line 66, in main
INFO   | jvm 2    | 2010/11/12 09:02:40 |     sync.main()
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/share/rhn/satellite_tools/reposync.py", line 103, in main
INFO   | jvm 2    | 2010/11/12 09:02:40 |     self.import_packages(plugin, url)
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/share/rhn/satellite_tools/reposync.py", line 134, in import_packages
INFO   | jvm 2    | 2010/11/12 09:02:40 |     packages = plug.list_packages()
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/share/rhn/satellite_tools/repo_plugins/yum_src.py", line 57, in list_packages
INFO   | jvm 2    | 2010/11/12 09:02:40 |     sack.populate(repo, 'metadata', None, 0)
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
INFO   | jvm 2    | 2010/11/12 09:02:40 |     if self._check_db_version(repo, mydbtype):
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
INFO   | jvm 2    | 2010/11/12 09:02:40 |     return repo._check_db_version(mdtype)
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1229, in _check_db_version
INFO   | jvm 2    | 2010/11/12 09:02:40 |     repoXML = self.repoXML
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1402, in <lambda>
INFO   | jvm 2    | 2010/11/12 09:02:40 |     repoXML = property(fget=lambda self: self._getRepoXML(),
INFO   | jvm 2    | 2010/11/12 09:02:40 |   File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1398, in _getRepoXML
INFO   | jvm 2    | 2010/11/12 09:02:40 |     raise Errors.RepoError, msg
INFO   | jvm 2    | 2010/11/12 09:02:40 | yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: csb6repo. Please verify its path and try again

WebUI log:
Sync started: Fri Nov 12 09:40:55 2010
['/usr/bin/spacewalk-repo-sync', '--channel', 'bad-repo-channel', '--type', 'yum']

Expected results:
1. no traceback, but a nice error message
2. show the same error message on the WebUI, too
Comment 1 Tomas Lestach 2010-12-16 07:44:58 EST
*** Bug 663614 has been marked as a duplicate of this bug. ***
Comment 2 Šimon Lukašík 2011-01-04 11:04:04 EST
Please note that the reposync will also crash when a single package
cannot be fetched. That is tracked in the bug 667143.
Comment 3 Tomas Lestach 2016-02-04 10:29:41 EST
We have re-reviewed this bug, as part of an ongoing effort to improve  Satellite/Proxy feature and bug updates, review and backlog.

We believe this bug has been fixed in the latest Satellite 5 version (5.7), so closing the bug as CURRENTRELEASE. Please feel free to re-open in case you discover any issues.

Tomas and Xixi