Project

Profile

Help

Issue #2422

closed

pulp-admin 2.7 does not work with pulp-server 2.10 (pulp-rpm to be more specific)

Added by mihai.ibanescu@gmail.com over 5 years ago. Updated about 3 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.10.0
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

I think plugin developers should think more about backwards compatibility with clients.

In this case, I was getting an error:

Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608) unexpected error occurred importing uploaded file: The field 'checksum_type' does not exist on the document 'RPM'
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608) Traceback (most recent call last):
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 113, in upload
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)     handlers[type_id](repo, type_id, unit_key, metadata, file_path, conduit, config)
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/upload.py", line 403, in _handle_package
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)     unit = model_class(**rpm_data)
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 735, in __init__
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)     super(RpmBase, self).__init__(*args, **kwargs)
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 153, in __init__
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)     super(NonMetadataPackage, self).__init__(*args, **kwargs)
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py", line 55, in __init__
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)     super(AutoRetryDocument, self).__init__(*args, **kwargs)
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/mongoengine/base/document.py", line 80, in __init__
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608)     raise FieldDoesNotExist(msg)
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp_rpm.plugins.importers.yum.upload:ERROR: (14734-80608) FieldDoesNotExist: The field 'checksum_type' does not exist on the document 'RPM'
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp.server.managers.content.upload:ERROR: (14734-80608) Error from the importer while importing uploaded unit to repository [yocto-x86_64]
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp.server.managers.content.upload:ERROR: (14734-80608) Traceback (most recent call last):
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp.server.managers.content.upload:ERROR: (14734-80608)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py", line 223, in import_uploaded_unit
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp.server.managers.content.upload:ERROR: (14734-80608)     unit_type=unit_type_id, summary=result['summary'], details=result['details']
Nov 14 12:00:40 pulp-dev-win.unx.sas.com pulp[14734]: pulp.server.managers.content.upload:ERROR: (14734-80608) PulpCodedException: The importer yum_importer indicated a failed response when uploading rpm unit to repository yocto-x86_64.

Which didn't make any sense at first blush.

What really happens: the old client is supplying the old-style fields (checksum_type). The pulp_rpm plugin attempts to take all the client-supplied metadata fields and pass them into the Mongo model's constructor.

In an ideal world, when a field is removed or renamed, the plugin should remove or rewrite the user-supplied metadata in the import call, so that old clients continue to work against new servers. I don't think it's overly taxing for the plugin developer to do this.

Also available in: Atom PDF