Bug 1487903 - Could not able to upload packages to yum repository.
Summary: Could not able to upload packages to yum repository.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-03 06:19 UTC by Nikhil Kathole
Modified: 2019-08-12 14:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:33:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log in production.log file while uploading invalid file (28.38 KB, text/plain)
2017-09-03 06:19 UTC, Nikhil Kathole
no flags Details
log in production.log file while uploading valid rpm package (52.11 KB, text/plain)
2017-09-03 06:20 UTC, Nikhil Kathole
no flags Details
screenshot of UI uploading invalid file (75.67 KB, image/png)
2017-09-03 06:28 UTC, Nikhil Kathole
no flags Details
screenshot of UI uploading valid packages (74.18 KB, image/png)
2017-09-03 06:30 UTC, Nikhil Kathole
no flags Details
screenshot of UI Tasks (37.72 KB, image/png)
2017-09-03 06:31 UTC, Nikhil Kathole
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21288 0 None None None 2017-10-10 19:47:45 UTC

Description Nikhil Kathole 2017-09-03 06:19:35 UTC
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:

Comment 1 Nikhil Kathole 2017-09-03 06:20:57 UTC
Created attachment 1321433 [details]
log in production.log file while uploading valid rpm package

Comment 2 Nikhil Kathole 2017-09-03 06:28:41 UTC
Created attachment 1321435 [details]
screenshot of UI uploading invalid file

Comment 3 Nikhil Kathole 2017-09-03 06:30:30 UTC
Created attachment 1321436 [details]
screenshot of UI uploading valid packages

Comment 4 Nikhil Kathole 2017-09-03 06:31:55 UTC
Created attachment 1321438 [details]
screenshot of UI Tasks

Comment 6 Andrew Kofink 2017-10-10 19:47:43 UTC
Created redmine issue http://projects.theforeman.org/issues/21288 from this bug

Comment 7 Satellite Program 2017-10-17 22:11:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21288 has been resolved.

Comment 8 Nikhil Kathole 2017-10-23 09:35:00 UTC
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?

Comment 9 Andrew Kofink 2017-10-23 13:32:25 UTC
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.

Comment 10 Nikhil Kathole 2017-10-23 14:10:17 UTC
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

Comment 11 pulp-infra@redhat.com 2017-10-23 15:31:51 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2017-10-23 15:31:54 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 13 Bryan Kearney 2018-02-21 16:33:08 UTC
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


Note You need to log in before you can comment on or make changes to this bug.