Issue #2543
closed
RPM Importer swallows exception when one is raised during upload
Status:
CLOSED - CURRENTRELEASE
Description
Originally written by daviddavis@redhat.com, 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
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.
- Related to Issue #2512: Puppet Importer swallows exception when one is raised during upload added
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.
- Sprint/Milestone set to 32
+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.
- Sprint/Milestone changed from 32 to 33
- Project changed from Pulp to RPM Support
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
- Status changed from ASSIGNED to NEW
- Assignee deleted (
daviddavis)
Unassigning this to myself since I am leaving tomorrow for vacation.
- Status changed from NEW to ASSIGNED
- Assignee set to fdobrovo
- Status changed from ASSIGNED to POST
- Status changed from POST to MODIFIED
- Related to Refactor #2614: Allow PulpCodedException to propagate during upload to relay error information added
- Platform Release set to 2.13.0
- Status changed from MODIFIED to 5
- Status changed from 5 to CLOSED - CURRENTRELEASE
- Related to Issue #3072: Too generic "The importer yum_importer indicated a failed response" added
- Related to deleted (Issue #3072: Too generic "The importer yum_importer indicated a failed response")
- Related to Issue #3072: Too generic "The importer yum_importer indicated a failed response" added
- Related to Issue #3090: Uploading an invalid rpm produces an error message: "unexpected error occurred importing uploaded file: 'primary'" added
- Sprint/Milestone deleted (
33)
Also available in: Atom
PDF
2543 - upload isn't showing whole error
closes #2543 https://pulp.plan.io/issues/2543