Issue #2543
closedRPM Importer swallows exception when one is raised during upload
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
Related issues
Updated by dalley almost 8 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.
Updated by dalley almost 8 years ago
- Related to Issue #2512: Puppet Importer swallows exception when one is raised during upload added
Updated by daviddavis almost 8 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.
Updated by bmbouter almost 8 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.
Updated by ipanova@redhat.com almost 8 years ago
- Project changed from Pulp to RPM Support
Updated by daviddavis almost 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis almost 8 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
daviddavis)
Unassigning this to myself since I am leaving tomorrow for vacation.
Updated by fdobrovo almost 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fdobrovo
Updated by fdobrovo almost 8 years ago
- Status changed from ASSIGNED to POST
Added by fdobrovo almost 8 years ago
Updated by fdobrovo almost 8 years ago
- Status changed from POST to MODIFIED
Applied in changeset 7321d9f033aee5f860916c67e78004441f3e79ac.
Updated by daviddavis almost 8 years ago
- Related to Refactor #2614: Allow PulpCodedException to propagate during upload to relay error information added
Updated by pcreech over 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Updated by daviddavis about 7 years ago
- Related to Issue #3072: Too generic "The importer yum_importer indicated a failed response" added
Updated by daviddavis about 7 years ago
- Related to deleted (Issue #3072: Too generic "The importer yum_importer indicated a failed response")
Updated by daviddavis about 7 years ago
- Related to Issue #3072: Too generic "The importer yum_importer indicated a failed response" added
Updated by daviddavis about 7 years ago
- Related to Issue #3090: Uploading an invalid rpm produces an error message: "unexpected error occurred importing uploaded file: 'primary'" added
2543 - upload isn't showing whole error
closes #2543 https://pulp.plan.io/issues/2543