Project

Profile

Help

Issue #3090

closed

Uploading an invalid rpm produces an error message: "unexpected error occurred importing uploaded file: 'primary'"

Added by daviddavis about 7 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.14.3
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 28
Quarter:

Description

This is a regression that was originally fixed in https://pulp.plan.io/issues/2543. See comments below for the commit that broke this.

Steps to reproduce:

touch meerkat-2.1.0.noarch.rpm
pulp-admin rpm repo uploads rpm  -f meerkat-2.1.0.noarch.rpm --repo-id zoo

I'd expect an error message along the lines of "couldn't parse rpm". Instead, the error message is:

Task Failed

The importer yum_importer indicated a failed response when uploading rpm unit to
repository test.

unexpected error occurred importing uploaded file: 'primary'

Related issues

Related to Pulp - Issue #3072: Too generic "The importer yum_importer indicated a failed response"CLOSED - WONTFIXActions
Related to RPM Support - Issue #2543: RPM Importer swallows exception when one is raised during uploadCLOSED - CURRENTRELEASEfdobrovoActions
Actions #1

Updated by daviddavis about 7 years ago

Looks like the cause is this commit:

https://github.com/pulp/pulp_rpm/commit/62db898a81679b40e3cc3a48af9f3b830f4521cb

I reverted and the error message I get is unexpected error occurred importing uploaded file: error reading package header.

Actions #2

Updated by daviddavis about 7 years ago

  • Related to Issue #3072: Too generic "The importer yum_importer indicated a failed response" added
Actions #3

Updated by daviddavis about 7 years ago

  • Related to deleted (Issue #3072: Too generic "The importer yum_importer indicated a failed response")
Actions #4

Updated by daviddavis about 7 years ago

  • Related to Issue #3072: Too generic "The importer yum_importer indicated a failed response" added
Actions #5

Updated by daviddavis about 7 years ago

Katello requested that we catch this error and raise a PulpCodedException so they can read the error details from the task[:error][:description]. I think that seems reasonable and something that we can address with this bug fix. If not, let me know and I can open another redmine issue.

Actions #6

Updated by daviddavis about 7 years ago

  • Description updated (diff)
  • Priority changed from Normal to High
Actions #9

Updated by dalley about 7 years ago

  • Sprint/Milestone set to 46
  • Triaged changed from No to Yes
Actions #11

Updated by jortel@redhat.com about 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com

Added by jortel@redhat.com about 7 years ago

Revision 4492f888 | View on GitHub

Raise coded exception for invalid package header. closes #3090

Added by jortel@redhat.com about 7 years ago

Revision 474781bf | View on GitHub

Propagate coded exceptions raised during upload. re: #3090

Actions #13

Updated by mhrivnak about 7 years ago

  • Sprint/Milestone changed from 46 to 47
Actions #14

Updated by jortel@redhat.com about 7 years ago

  • Status changed from POST to MODIFIED
Actions #15

Updated by pcreech about 7 years ago

  • Platform Release set to 2.14.3
Actions #16

Updated by pthomas@redhat.com about 7 years ago

verified

[root@intel-sharkbay-dh-02 ~]# rpm -qa |grep pulp
python-pulp-common-2.14.3-0.1.beta.el7.noarch
python-kombu-3.0.33-8.pulp.el7.noarch
pulp-puppet-plugins-2.14.3-0.1.beta.el7.noarch
pulp-docker-admin-extensions-3.0.2-1.el7.noarch
pulp-ostree-plugins-1.3.0-1.el7.noarch
python-pulp-rpm-common-2.14.3-0.1.beta.el7.noarch
pulp-python-admin-extensions-2.0.2-1.el7.noarch
python-pulp-docker-common-3.0.2-1.el7.noarch
pulp-selinux-2.14.3-0.1.beta.el7.noarch
python-pulp-oid_validation-2.14.3-0.1.beta.el7.noarch
pulp-rpm-plugins-2.14.3-0.1.beta.el7.noarch
pulp-admin-client-2.14.3-0.1.beta.el7.noarch
python-pulp-ostree-common-1.3.0-1.el7.noarch
python-pulp-python-common-2.0.2-1.el7.noarch
pulp-python-plugins-2.0.2-1.el7.noarch
python-pulp-streamer-2.14.3-0.1.beta.el7.noarch
python-pulp-repoauth-2.14.3-0.1.beta.el7.noarch
pulp-server-2.14.3-0.1.beta.el7.noarch
python-pulp-bindings-2.14.3-0.1.beta.el7.noarch
pulp-puppet-admin-extensions-2.14.3-0.1.beta.el7.noarch
pulp-ostree-admin-extensions-1.3.0-1.el7.noarch
python-pulp-puppet-common-2.14.3-0.1.beta.el7.noarch
python-pulp-client-lib-2.14.3-0.1.beta.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
pulp-docker-plugins-3.0.2-1.el7.noarch
pulp-rpm-admin-extensions-2.14.3-0.1.beta.el7.noarch
[root@intel-sharkbay-dh-02 ~]# 
[root@intel-sharkbay-dh-02 ~]# touch meerkat-2.1.0.noarch.rpm
[root@intel-sharkbay-dh-02 ~]# pulp-admin rpm repo create --repo-id zoo
Successfully created repository [zoo]

[root@intel-sharkbay-dh-02 ~]# pulp-admin rpm repo uploads rpm  -f meerkat-2.1.0.noarch.rpm --repo-id zoo
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: meerkat-2.1.0.noarch.rpm
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: meerkat-2.1.0.noarch.rpm
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
canceled entirely using the cancel command.

Uploading: meerkat-2.1.0.noarch.rpm
... completed

Importing into the repository...
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Failed

Error reading uploaded package header.

Deleting the upload request...
... completed
Actions #17

Updated by pcreech about 7 years ago

  • Status changed from MODIFIED to 5
Actions #18

Updated by daviddavis about 7 years ago

  • Related to Issue #2543: RPM Importer swallows exception when one is raised during upload added
Actions #19

Updated by bmbouter over 6 years ago

  • Sprint set to Sprint 28
Actions #20

Updated by bmbouter over 6 years ago

  • Sprint/Milestone deleted (47)
Actions #22

Updated by jortel@redhat.com over 6 years ago

  • Status changed from 5 to MODIFIED
Actions #23

Updated by kersom over 5 years ago

We already have test for this issue. 3090

Actions #24

Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions #25

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF