Bug 1420843 - Unable to sync a yum repo - "global name 'rpm_parse' is not defined"
Summary: Unable to sync a yum repo - "global name 'rpm_parse' is not defined"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.2.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-09 15:44 UTC by Roman Plevka
Modified: 2019-09-26 16:16 UTC (History)
3 users (show)

Fixed In Version: pulp-rpm-2.8.7.8-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-06 08:38:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0447 0 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 13:23:41 UTC

Description Roman Plevka 2017-02-09 15:44:46 UTC
Description of problem:
Regression -
Pulp is unable to sync a yum repo due to some (probably) missing libs:

# from /var/log/messages:
Feb  9 10:37:13 bkr-hv01-guest02 pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (4): inecas.fedorapeople.org
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Generating metadata databases.
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Determining which units need to be downloaded.
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440) global name 'rpm_parse' is not defined
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440) Traceback (most recent call last):
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 262, in run
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     self.update_content(metadata_files, url)
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     self.gen.throw(type, value, traceback)
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 224, in update_state
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     yield skip
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 262, in run
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     self.update_content(metadata_files, url)
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 534, in update_content
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     rpms_to_download, drpms_to_download = self._decide_what_to_download(metadata_files, catalog)
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 557, in _decide_what_to_download
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     self._decide_rpms_to_download(metadata_files, catalog)
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 595, in _decide_rpms_to_download
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     wanted, self.conduit, self.download_deferred, catalog)
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/existing.py", line 142, in check_all_and_associate
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440)     if rpm_parse.signature_enabled(config):
Feb  9 10:37:14 bkr-hv01-guest02 pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (14804-65440) NameError: global name 'rpm_parse' is not defined


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

How reproducible:
always

Steps to Reproduce:
1.# hammer -u admin -p changeme repository create --name repo --url="http://inecas.fedorapeople.org/fakerepos/zoo3/" --content-type yum  --product-id 1
2.# hammer -u admin -p changeme repository synchronize --name repo --product product --organization-id 1
3.# hammer -u admin -p changeme repository synchronize --name repo --product product --organization-id 1
[....................................] [100%]
Processing metadata.
Error: PLP0000: Importer indicated a failed response


Actual results:
Error: PLP0000: Importer indicated a failed response


Expected results:
repos syncs fine

Additional info:

Comment 3 Michael Hrivnak 2017-02-09 17:42:12 UTC
This appears to be a problem introduced by cherry-picking gone wrong. The failing code was introduced upstream in Pulp 2.10 and is working well there.

Comment 4 Michael Hrivnak 2017-02-09 17:49:36 UTC
I'm moving this over to the Packaging component, since I think it needs to be resolved by fixing a cherry-pick. Hopefully that's the right component.

Let me know if you need any Pulp assistance with sorting out the details. You can contact ipanova directly as well, who wrote the code that was apparently cherry-picked.

Comment 5 Michael Hrivnak 2017-02-09 17:52:41 UTC
For reference, here is the upstream feature that appears to have been cherry-picked. It introduced the code that you see breaking.

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

Comment 6 Roman Plevka 2017-02-20 09:56:30 UTC
VERIFIED
on sat6.2.8-2.0

2017-02-10 17:48:59 - nailgun.client - DEBUG - Making HTTP GET request to https://qe-sat62.redhat.com/katello/api/v2/repositories/191 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and no data.
2017-02-10 17:48:59 - nailgun.client - DEBUG - Received HTTP 200 response:   
{"content_type":"yum",
...
"download_policy":"immediate",
"url":"http://inecas.fedorapeople.org/fakerepos/zoo3/",
...
"id":191,
"name":"uZdSAGIU",
"label":"uZdSAGIU",
...,
"last_sync":{"id":"2fe231be-7127-4732-8b2a-639962622fe2","username":"admin","started_at":"2017-02-10 22:48:42 UTC","ended_at":"2017-02-10 22:48:56 UTC",
"state":"stopped",
"result":"success",
"progress":1.0},
"content_counts":{...,"rpm":32,"package":32,"package_group":2,"erratum":4,"puppet_module":0},"last_sync_words":"less than a minute",...}

Comment 8 errata-xmlrpc 2017-03-06 08:38:02 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-2017:0447


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