Actions
Issue #2020
closedCannot provide multiple checksums when uploading an erratum
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.9.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
One can upload and import an erratum to an RPM repository with a call like the following:
POST /pulp/api/v2/repositories/my_repo_id/actions/import_upload/ HTTP/1.1
Host pulp.example.com
Content-Type: application/json; charset=UTF-8
[…]
{
"unit_key": {"id": "my_erratum_id"},
"unit_metadata": {
"id": "my_erratum_id",
"description": "Dummy advisory for testing purposes\n",
"from": "nobody@redhat.com",
"issued": "2014-09-24 00:00:00",
"pkglist": [
{
"name": "RHSA-2014:1293",
"packages": [
{
"arch": "noarch",
"epoch": "0",
"filename": "bear-4.1-1.noarch.rpm",
"name": "bear",
"release": "1",
"src": "bear-4.1-1.src.rpm",
"sum": [
"md5",
"37b48f6bbd1df40511f429e7fa16902a",
"sha256",
"7a831f9f90bf4d21027572cb503d20b702de8e8785b02c0397445c2e481d81b3"
],
"version": "4.1"
}
],
"short": ""
}
],
"pushcount": "1",
"reboot_suggested": false,
"references": [
{
"href": "https://rhn.redhat.com/errata/RHSA-9999-0001.html",
"id": null,
"title": "RHSA-9999:0001",
"type": "self"
}
],
"release": "0",
"rights": "Copyright 2014 Red Hat Inc",
"severity": "Critical",
"solution": "Eat sleep rave repeat\n",
"status": "final",
"summary": "This advisory solves nothing\n",
"title": "Dummy advisory 1",
"type": "security",
"updated": "2014-09-24 00:00:00",
"version": "1"
},
"unit_type_id": "erratum",
"upload_id": "my_upload_id"
}
Unfortunately, Pulp doesn't like it when the sum
element has more than two members. Pulp will log the following:
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) Exception caught from plugin during publish for repo [18e5824e-58cc-434d-bab3-91832d19f71d]
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) Traceback (most recent call last):
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1090, in _do_publish
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) publish_report = publish_repo(transfer_repo, conduit, call_config)
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 658, in wrap_f
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) return f(*args, **kwargs)
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 174, in publish_repo
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) return self._publisher.process_lifecycle()
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 562, in process_lifecycle
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) super(PluginStep, self).process_lifecycle()
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 159, in process_lifecycle
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) step.process()
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 232, in process
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) self._process_block(item=item)
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 291, in _process_block
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) self.process_main(item=item)
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/metadata/updateinfo.py", line 178, in add_unit_metadata
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) checksum_type, checksum_value = checksum_tuple
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.controllers.repository:ERROR: (6723-45152) ValueError: too many values to unpack
Jun 17 11:47:20 pulp.example.com pulp[6723]: pulp.server.async.tasks:INFO: Task failed : [f0346ed7-ee90-4bc5-b901-68fca391c5a5]
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) Task pulp.server.managers.repo.publish.publish[f0346ed7-ee90-4bc5-b901-68fca391c5a5] raised unexpected: ValueError('too many values to unpack',)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) Traceback (most recent call last):
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) R = retval = fun(*args, **kwargs)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) return super(Task, self).__call__(*args, **kwargs)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) return super(PulpTask, self).__call__(*args, **kwargs)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) return self.run(*args, **kwargs)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 971, in publish
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1038, in check_publish
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1090, in _do_publish
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) publish_report = publish_repo(transfer_repo, conduit, call_config)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 658, in wrap_f
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) return f(*args, **kwargs)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 174, in publish_repo
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) return self._publisher.process_lifecycle()
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 562, in process_lifecycle
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) super(PluginStep, self).process_lifecycle()
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 159, in process_lifecycle
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) step.process()
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 232, in process
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) self._process_block(item=item)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 291, in _process_block
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) self.process_main(item=item)
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/metadata/updateinfo.py", line 178, in add_unit_metadata
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) checksum_type, checksum_value = checksum_tuple
Jun 17 11:47:20 pulp.example.com pulp[6399]: celery.worker.job:ERROR: (6399-45152) ValueError: too many values to unpack
Related issues
Actions
Handle multiple checksums in the erratum package list during publish.
closes #2020 https://pulp.plan.io/issues/2020