Project

Profile

Help

Issue #3090

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

Added by daviddavis almost 3 years ago. Updated over 1 year 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 - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to RPM Support - Issue #2543: RPM Importer swallows exception when one is raised during uploadCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 4492f888 View on GitHub
Added by jortel@redhat.com almost 3 years ago

Raise coded exception for invalid package header. closes #3090

Revision 474781bf View on GitHub
Added by jortel@redhat.com almost 3 years ago

Propagate coded exceptions raised during upload. re: #3090

History

#1 Updated by daviddavis almost 3 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.

#2 Updated by daviddavis almost 3 years ago

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

#3 Updated by daviddavis almost 3 years ago

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

#4 Updated by daviddavis almost 3 years ago

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

#5 Updated by daviddavis almost 3 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.

#6 Updated by daviddavis almost 3 years ago

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

#9 Updated by dalley almost 3 years ago

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

#11 Updated by jortel@redhat.com almost 3 years ago

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

#13 Updated by mhrivnak almost 3 years ago

  • Sprint/Milestone changed from 46 to 47

#14 Updated by jortel@redhat.com almost 3 years ago

  • Status changed from POST to MODIFIED

#15 Updated by pcreech almost 3 years ago

  • Platform Release set to 2.14.3

#16 Updated by pthomas@redhat.com almost 3 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

#17 Updated by pcreech almost 3 years ago

  • Status changed from MODIFIED to 5

#18 Updated by daviddavis almost 3 years ago

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

#19 Updated by bmbouter over 2 years ago

  • Sprint set to Sprint 28

#20 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (47)

#22 Updated by jortel@redhat.com over 2 years ago

  • Status changed from 5 to MODIFIED

#23 Updated by kersom over 1 year ago

We already have test for this issue. 3090

#24 Updated by dkliban@redhat.com over 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#25 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF