Created attachment 1321432 [details] log in production.log file while uploading invalid file Description of problem: we were trying to upload packages to yum repository.When attempted to upload any invalid file to yum repo, it throws error as "Error during upload : Task :Katello:Errors::PulpError:The importer indicated failed response when uploading" and production.log shows 500 internal server error. And later tried to upload any valid rpm packages it shows "Error during upload:Required lock is already taken by other running task" and production.log again shows 500 internal server error. we could not able to delete that repo also. Version-Release number of selected component (if applicable): satellite 6.3 snap 14 How reproducible:always Steps to Reproduce: 1. Create a product 2. Create a repository 3. Try to upload any invalid file(text file,image) 4. It shows error which is valid but production.log shows 500ISE. tail -f /var/log/foreman/production.log 5. Try to upload any valid rpm package. 6. Try to delete repo/product. Actual results: While uploading invalid file, 500 internal server error in production.log and notification shows "Error during upload : Task :Katello:Errors::PulpError:The importer indicated failed response when uploading".After that user could not able to upload valid rpm packages due to "Required lock is already taken by other running tasks." Expected results: While uploading invalid file, it should display valid message and log error should be get handled. After that, user should be able to upload valid rpm packages and can also delete repo/product. Additional info:
Created attachment 1321433 [details] log in production.log file while uploading valid rpm package
Created attachment 1321435 [details] screenshot of UI uploading invalid file
Created attachment 1321436 [details] screenshot of UI uploading valid packages
Created attachment 1321438 [details] screenshot of UI Tasks
Created redmine issue http://projects.theforeman.org/issues/21288 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21288 has been resolved.
Version Tested: Satellite-6.3 Snap 21 Steps: 1. Created product 2. Created repository 3. Tried to upload any invalid file(text file,image) 4. Uploaded valid rpm package 5. Deleted product/repo Successfully uploaded valid rpm package after trying to upload any invalid file and successfully deleted repo/product. But while trying to upload invalid file, production.log still shows 500 internal server error. Is this expected behaviour? Can valid message be there on UI showing invalid file to upload and log error get handle?
You should see the same error (i.e.): Error during upload: Task 83ac50b7-bb1d-418f-b91d-5fb0b3222904: Katello::Errors::PulpError: PLP0047: The importer yum_importer indicated a failed response when uploading rpm unit to repository b973ec26-8198-4e64-9f57-8548b389961e. A better error message is not able to be passed to the user because Pulp does not provide it yet. The pulp issue https://pulp.plan.io/issues/3090 will address the error message. At that point, Katello should display the proper error message in the task output. The key fix included in the change upstream is that the task does not pause and block further uploads. It properly skips and allows more uploads without the user needing to skip the Dynflow task manually. This matches the expected results of the bug: an error is logged and handled, and the user should be able to upload valid rpm packages and can also delete repo/product. In my opinion, a new bug should be used to track the better error message, as it's currently blocked by Pulp.
VERIFIED steps according to comment #8. Created new issue for Uploading an invalid rpm should show better error message https://bugzilla.redhat.com/show_bug.cgi?id=1505397
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336