Project

Profile

Help

Issue #3090

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

Added by daviddavis over 1 year ago. Updated about 1 month ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Severity:
2. Medium
Version:
Platform Release:
2.14.3
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
Yes
Verification Required:
No
Sprint:
Sprint 28

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 Actions
Related to RPM Support - Issue #2543: RPM Importer swallows exception when one is raised during upload CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision 4492f888 View on GitHub
Added by jortel@redhat.com over 1 year ago

Raise coded exception for invalid package header.
closes #3090

Revision 474781bf View on GitHub
Added by jortel@redhat.com over 1 year ago

Propagate coded exceptions raised during upload.
re: #3090

History

#1 Updated by daviddavis over 1 year 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 over 1 year ago

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

#3 Updated by daviddavis over 1 year ago

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

#4 Updated by daviddavis over 1 year ago

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

#5 Updated by daviddavis over 1 year 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 over 1 year ago

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

#9 Updated by dalley over 1 year ago

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

#10 Updated by pthomas@redhat.com over 1 year ago

  • Smash Test set to 544

#11 Updated by jortel@redhat.com over 1 year ago

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

#13 Updated by mhrivnak over 1 year ago

  • Sprint/Milestone changed from 46 to 47

#14 Updated by jortel@redhat.com over 1 year ago

  • Status changed from POST to MODIFIED

#15 Updated by pcreech over 1 year ago

  • Platform Release set to 2.14.3

#16 Updated by pthomas@redhat.com over 1 year ago

  • Verified changed from No to Yes

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 over 1 year ago

  • Status changed from MODIFIED to ON_QA

#18 Updated by daviddavis over 1 year ago

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

#19 Updated by bmbouter about 1 year ago

  • Sprint set to Sprint 28

#20 Updated by bmbouter about 1 year ago

  • Sprint/Milestone deleted (47)

#22 Updated by jortel@redhat.com 11 months ago

  • Status changed from ON_QA to MODIFIED

#23 Updated by kersom 2 months ago

We already have test for this issue. 3090

#24 Updated by dkliban@redhat.com 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#25 Updated by bmbouter about 1 month ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF