Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.

Issue #2020

closed

Cannot provide multiple checksums when uploading an erratum

Added by Ichimonji10 over 8 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
-
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

Blocks RPM Support - Story #1878: Support for choosing the checksum type in updateinfoCLOSED - CURRENTRELEASEttereshc

Actions
Actions #1

Updated by amacdona@redhat.com over 8 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
Actions #3

Updated by ttereshc over 8 years ago

  • Blocks Story #1878: Support for choosing the checksum type in updateinfo added
Actions #4

Updated by ttereshc over 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #5

Updated by ttereshc over 8 years ago

  • Status changed from ASSIGNED to POST

Added by ttereshc over 8 years ago

Revision c7b58d47 | View on GitHub

Handle multiple checksums in the erratum package list during publish.

closes #2020 https://pulp.plan.io/issues/2020

Actions #6

Updated by ttereshc over 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #7

Updated by semyers over 8 years ago

  • Platform Release set to 2.9.1
  • Triaged changed from Yes to No
Actions #8

Updated by jcline@redhat.com over 8 years ago

  • Triaged changed from No to Yes

Looks like smyers accidentally untriaged this. As it's already modified and a target release is set I'm going to mark it triaged again. @smyers if I'm undoing something you wanted, feel free to change it back :)

Actions #9

Updated by pthomas@redhat.com over 8 years ago

  • Status changed from MODIFIED to 6

Verified
on
2.9.1 beta and 2.10 alpha

Actions #10

Updated by semyers over 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF