Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1108138 - Channel exporter tooling needs to handle missing repodata gracefully
Summary: Channel exporter tooling needs to handle missing repodata gracefully
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Transitions
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Tomas Lestach
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: stargate-GA-tracker
TreeView+ depends on / blocked
 
Reported: 2014-06-11 13:08 UTC by Lukas Pramuk
Modified: 2019-09-26 14:45 UTC (History)
1 user (show)

Fixed In Version: spacewalk-utils-2.0.2-14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:19:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lukas Pramuk 2014-06-11 13:08:36 UTC
Description of problem:
Channel exporter tooling when tries to handle repository with missing repodata produces a traceback. The tooling needs to handle missing repodata gracefully.

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


How reproducible:
100%

Steps to Reproduce:

# spacewalk-export

INFO: Processing channels...
Processing organization: ClusterStorageQE
Processing organization: GSS
...
 * channel: epel_rhel6_x86-64 with: 8614 packages
Traceback (most recent call last):
  File "/usr/bin/spacewalk-export-channels", line 297, in <module>
    export_packages(options)
  File "/usr/bin/spacewalk-export-channels", line 120, in export_packages
    repo_packages[repo['id']] = list_repo_packages(repo['label'], repo['source_url'])
  File "/usr/bin/spacewalk-export-channels", line 236, in list_repo_packages
    packages = map(lambda p:p.getNEVRA(), plugin.list_packages(repo_plugin, []))
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/repo_plugins/yum_src.py", line 159, in list_packages
    self.sack.populate(self.repo, 'metadata', None, 0)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1451, in _getRepoXML
    raise Errors.RepoError, msg
yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: epel_repo_rhel6_x86-64. Please verify its path and try again
INFO: Processing system-groups...
INFO: Processing activation-keys...
INFO: Processing repositories...
INFO: Processing users...
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz

Actual results:
traceback

Expected results:
warning about missing repodata and proceeding with what it can

Additional info:
repo['label'] = 'epel_repo_rhel6_x86-64'
repo['source_url'] = 'http://mirrors.servercentral.net/fedora/epel/6/x86_64/' - 404 Not Found

Comment 1 RHEL Program Management 2014-06-11 13:09:45 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Tomas Lestach 2014-06-11 14:43:18 UTC
spacewalk.git: b34c64a08f95c6ba48131bb57c43d08ea078308f

Fixed in upstream spacewalk-utils-2.2.20-1

Comment 6 Lukas Pramuk 2014-08-25 12:26:35 UTC
VERIFIED. spacewalk-utils-2.0.2-15.el6sat

1. @SAT5: create repo with non-existent url 
2. export repositories:
# spacewalk-export --entities=repositories
INFO: Processing repositories...
INFO: Export-file created at /root/spacewalk-export-dir/spacewalk_export.tar.gz

Comment 7 Bryan Kearney 2014-09-11 12:19:05 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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