Project

Profile

Help

Issue #2543

RPM Importer swallows exception when one is raised during upload

Added by dalley over 2 years ago. Updated 6 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
2.13.0
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 15

Description

Originally written by , recreated after I accidentally deleted the issue

When uploading an invalid rpm, you get a generic error message: "The importer yum_importer indicated a failed response when uploading rpm unit to repository zoolander." I'd expect some sort of error message about the rpm being invalid instead. Even something like the message logged in journalctl would suffice (ie "error reading package header").

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 zoolander

Related issues

Related to Puppet Support - Issue #2512: Puppet Importer swallows exception when one is raised during upload CLOSED - CURRENTRELEASE Actions
Related to RPM Support - Refactor #2614: Allow PulpCodedException to propagate during upload to relay error information CLOSED - WONTFIX Actions
Related to Pulp - Issue #3072: Too generic "The importer yum_importer indicated a failed response" CLOSED - WONTFIX Actions
Related to Pulp - Issue #3090: Uploading an invalid rpm produces an error message: "unexpected error occurred importing uploaded file: 'primary'" CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision 7321d9f0 View on GitHub
Added by fdobrovo over 2 years ago

2543 - upload isn't showing whole error

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

History

#1 Updated by dalley over 2 years ago

When I test this, I do get such an error message (it's logged before the traceback instead of after, so it is not as prominent and easy to miss).

Jan 24 21:37:01 dev.example.com pulp[4444]: pulp_rpm.plugins.importers.yum.upload:ERROR: [a087e7b5] (4444-63232) Error extracting RPM metadata for [/var/lib/pulp/uploads/30820126-11c3-4dfe-a585-67b7fa68cbeb]

I do think this message is still overly vague and technical, and could be improved a lot. I think we could also pass the information about the cause of the failure from where it is first logged and include it in the later error message that you've pointed out in the description.

#2 Updated by dalley over 2 years ago

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

#3 Updated by daviddavis over 2 years ago

@dalley that works. As long as the pulp-admin user sees a specific error messages besides "The importer yum_importer indicated a failed response..." without having to look in the log files.

Also, another thing to consider: we'll want to make sure that the actual error is being passed back in the api (this might already be the case) so Katello for instance can pass this on to their users.

#4 Updated by dalley over 2 years ago

  • Sprint/Milestone set to 32

#5 Updated by bmbouter over 2 years ago

+1 to having a good error message be shown to the user via the API and pulp-admin. I believe this is as simple as raising an exception. The message of the exception will be stored on the TaskStatus. I think that happens here. These "exception swalling" issues I think are mainly fatal errors that should raise an Exception but don't.

The main issue with "fixing" these issues is that there could be important code that would not get run and that could cause behavioral backwards incompatabilities. So that is something to consider. @dkliban and @mhrivnak are also well versed in these things topics.

Note that I think this is about the exception being unraised or a fatal exception being treated as a non-fatal exception which causes pulp-admin to not receive the errors and instead it shows success. The error message and logging could be improved, but that would be an additional improvement on top of the primary goal. I could be wrong about this interpretation from the original report, but I wanted to post some thoughts.

#6 Updated by pthomas@redhat.com over 2 years ago

  • Smash Test set to 544

#7 Updated by mhrivnak over 2 years ago

  • Sprint/Milestone changed from 32 to 33

#8 Updated by ipanova@redhat.com over 2 years ago

  • Project changed from Pulp to RPM Support

#9 Updated by daviddavis over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#10 Updated by daviddavis over 2 years ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (daviddavis)

Unassigning this to myself since I am leaving tomorrow for vacation.

#11 Updated by fdobrovo over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fdobrovo

#12 Updated by fdobrovo over 2 years ago

  • Status changed from ASSIGNED to POST

#13 Updated by fdobrovo over 2 years ago

  • Status changed from POST to MODIFIED

#14 Updated by daviddavis over 2 years ago

  • Related to Refactor #2614: Allow PulpCodedException to propagate during upload to relay error information added

#15 Updated by semyers over 2 years ago

  • Platform Release set to 2.13.0

#16 Updated by pcreech over 2 years ago

  • Status changed from MODIFIED to ON_QA

#17 Updated by pcreech over 2 years ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#18 Updated by daviddavis almost 2 years ago

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

#19 Updated by daviddavis almost 2 years ago

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

#20 Updated by daviddavis almost 2 years ago

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

#21 Updated by daviddavis almost 2 years ago

  • Related to Issue #3090: Uploading an invalid rpm produces an error message: "unexpected error occurred importing uploaded file: 'primary'" added

#22 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 15

#23 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (33)

#24 Updated by bmbouter 6 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF