Actions
Issue #2093
closederrors importing some rpms after upgrading to pulp 2.9
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.9.0
Platform Release:
2.9.2
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 6
Quarter:
Description
Hi,
After upgrading to pulp 2.9, we encounter errors uploading some rpms. For example protobuf-2.3.0-9.el6.x86_64.rpm from epel fails with this message:
Task Failed
The importer yum_importer indicated a failed response when uploading rpm unit to
repository external_rpms_el6.
Those are the logs from the server (a unicode ):
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) unexpected error occurred importing uploaded file: 'ascii' codec can't decode byte 0xc4 in position 116281: ordinal not in range(128)
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) Traceback (most recent call last):
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 113, in upload
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) handlers[type_id](repo, type_id, unit_key, metadata, file_path, conduit, config)
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 410, in _handle_package
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) unit.modify_xml()
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 824, in modify_xml
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) faked_other = utils.fake_xml_element(self.repodata['other'])
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/utils.py", line 128, in fake_xml_element
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) repodata_snippet.encode(codec)
pulp_rpm.plugins.importers.yum.upload:ERROR: (20733-48768) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 116281: ordinal not in range(128)
pulp.server.managers.content.upload:ERROR: (20733-48768) Error from the importer while importing uploaded unit to repository [external_rpms_el6]
pulp.server.managers.content.upload:ERROR: (20733-48768) Traceback (most recent call last):
pulp.server.managers.content.upload:ERROR: (20733-48768) File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py", line 223, in import_uploaded_unit
pulp.server.managers.content.upload:ERROR: (20733-48768) unit_type=unit_type_id, summary=result['summary'], details=result['details']
pulp.server.managers.content.upload:ERROR: (20733-48768) PulpCodedException: The importer yum_importer indicated a failed response when uploading rpm unit to repository external_rpms_el6.
pulp.server.async.tasks:INFO: Task failed : [f8bc500a-6dae-40bf-b69c-7ed37f30a30d] : The importer yum_importer indicated a failed response when uploading rpm unit to repository external_rpms_el6.
Actions
Fixes unicode encoding issue for non-ASCII characters in the metadata
closes #2093 https://pulp.plan.io/issues/2093