Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1420843 - Unable to sync a yum repo - "global name 'rpm_parse' is not defined"
Unable to sync a yum repo - "global name 'rpm_parse' is not defined"
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Packaging (Show other bugs)
6.2.8
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 6.2.8
: Unused
Assigned To: satellite6-bugs
Roman Plevka
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-09 10:44 EST by Roman Plevka
Modified: 2017-03-06 03:38 EST (History)
3 users (show)

See Also:
Fixed In Version: pulp-rpm-2.8.7.8-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-06 03:38:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0447 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 08:23:41 EST

  None (edit)
Description Roman Plevka 2017-02-09 10:44:46 EST
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 12:42:12 EST
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 12:49:36 EST
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 12:52:41 EST
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 04:56:30 EST
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 03:38:02 EST
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.