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 1519564 - Syncing RHEL7 Server RPMs generating ImporterError
Summary: Syncing RHEL7 Server RPMs generating ImporterError
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.1.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-30 22:23 UTC by Brad Buckingham
Modified: 2021-03-11 16:28 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-01 14:11:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brad Buckingham 2017-11-30 22:23:41 UTC
Description of problem:

Attempting to sync 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server' generates an importer error; however, this does not occur for all repositories.

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

satellite-6.3.0-21.0.beta.el7sat.noarch
tfm-rubygem-katello-3.4.5.25-1.el7sat.noarch

pulp-ostree-plugins-1.2.1.1-1.el7sat.noarch
pulp-puppet-plugins-2.13.4-3.el7sat.noarch
pulp-client-1.0-1.noarch
pulp-selinux-2.13.4.2-1.el7sat.noarch
python-isodate-0.5.0-5.pulp.el7sat.noarch
python-pulp-docker-common-2.4.1-2.el7sat.noarch
python-pulp-oid_validation-2.13.4.2-1.el7sat.noarch
pulp-katello-1.0.2-1.el7sat.noarch
python-pulp-common-2.13.4.2-1.el7sat.noarch
python-pulp-rpm-common-2.13.4.2-2.el7sat.noarch
python-kombu-3.0.33-8.pulp.el7sat.noarch
pulp-puppet-tools-2.13.4-3.el7sat.noarch
python-pulp-repoauth-2.13.4.2-1.el7sat.noarch
pulp-docker-plugins-2.4.1-2.el7sat.noarch
python-pulp-streamer-2.13.4.2-1.el7sat.noarch
pulp-admin-client-2.13.4.2-1.el7sat.noarch
python-pulp-client-lib-2.13.4.2-1.el7sat.noarch
python-pulp-bindings-2.13.4.2-1.el7sat.noarch
python-pulp-puppet-common-2.13.4-3.el7sat.noarch
python-pulp-ostree-common-1.2.1.1-1.el7sat.noarch
rubygem-smart_proxy_pulp-1.3.0-1.git.0.b5c2768.el7sat.noarch
pulp-server-2.13.4.2-1.el7sat.noarch
pulp-rpm-plugins-2.13.4.2-2.el7sat.noarch


How reproducible:
always

Steps to Reproduce:
1. import manifest
2. enable 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server'
3. attempt to sync the repo

Actual results:

Sync task fails with:
Importer indicated a failed response

Expected results:

Sync succeeds.

Additional info:

The stack trace is: 

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 269, in run
    self.update_content(metadata_files, url)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 569, in update_content
    purge.purge_unwanted_units(metadata_files, self.conduit, self.config, catalog)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 44, in purge_unwanted_units
    remove_missing_errata(metadata_files, conduit)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 146, in remove_missing_errata
    updateinfo.process_package_element)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 275, in get_remote_units
    for unit in package_info_generator:
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/packages.py", line 64, in package_list_generator
    package_info = process_func(element)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 46, in process_package_element
    'references': map(_parse_reference, element.find('references') or []),
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 88, in _parse_reference
    'href': element.attrib['href'],
KeyError: 'href'

Comment 2 Brad Buckingham 2017-11-30 22:32:44 UTC
This appears to be an issue on 6.2 as well; therefore, while could be a bug in Satellite, it appears to be being triggered by a change in the CDN content.

Comment 3 David Davis 2017-11-30 22:52:39 UTC
It looks like this line is throwing the exception:

https://github.com/pulp/pulp_rpm/blob/10cb4e59b0ff80904e4704a73ff5e3fdb4762860/plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py#L88

This code has existed since 2012. I'm guessing the cause is the updateinfo.xml file has a 'reference' in pkglist without an href.

Comment 4 David Davis 2017-11-30 23:24:33 UTC
Looks like the culprit is RHSA-2017:3315.

Comment 6 David Davis 2017-12-01 01:30:45 UTC
Content Delivery team reports the problem has been fixed and I was able to successfully sync 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server'.

Comment 7 Mike McCune 2017-12-01 02:11:33 UTC
Propose we close this as NOTABUG as it was an issue with the CDN

Comment 8 David Davis 2017-12-01 13:41:24 UTC
Tested the sync against Satellite version 6.3.0 beta.

Comment 9 David Davis 2017-12-01 14:10:28 UTC
Looks like release engineering has a bug open that should prevent this from happening again:

https://bugzilla.redhat.com/show_bug.cgi?id=1466322

I opened a bug in upstream Pulp to make it more resilient and/or provide better logging when parsing repo metadata:

https://pulp.plan.io/issues/3162


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