Bug 855461

Summary: Manifest upload history reports success when part of the import process fails
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: WebUIAssignee: satellite6-bugs <satellite6-bugs>
WebUI sub component: Katello QA Contact: vijsingh
Status: CLOSED WONTFIX Docs Contact:
Severity: medium    
Priority: medium CC: jlabocki, mhulan, mmccune, omaciel, tasander, tcarlin, tomckay
Version: 6.0.0Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-18 17:38:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot on failed import. none

Description Brad Buckingham 2012-09-07 20:49:21 UTC
Created attachment 610846 [details]
Screenshot on failed import.

Description of problem:

When a user uploads a manifest, there are a couple of high-level phases that occur: 1) the manifest is uploaded to candlepin and then 2) katello will create repositories (using the info from the imported manifest and the cdn).

The issue that this bugzilla raises is that if the first step succeeds and the second fails (e.g. timeout with the CDN), the import will still be reported as successful on the Subscriptions page Upload History.  The reason being, the Upload History is based upon the information from candlepin and not the overall completion of the upload from katello's point of view.

This issue was observed while working on bug 809259 .

Version-Release number of selected component (if applicable):
github master

How reproducible:
always

Steps to Reproduce:
follow the steps described in bug 809259
  
Actual results:

Upload history report success.  E.g. 
   ACME_Corporation file imported successfully. 

Expected results:

Upload history reports failure. E.g.
   ACME_Corporation file import failed. Reason: timeout interfacing with CDN.
 
Additional info:

Attached is a screen shot that shows that a failure has occured, but the history shows successful.  Ignore the "killed thread" in the reason as I was working in the debugger at the time which generated that particular reason.

Comment 1 Tom McKay 2012-09-19 12:12:54 UTC
*** Bug 858665 has been marked as a duplicate of this bug. ***

Comment 2 Tom McKay 2012-09-19 12:14:19 UTC
Believe this is a much higher priority issue. Giving a successful indication to the user for a failed import is going to lead to confusion.

Note that there is an error notice generated for the pulp failure.

Comment 3 Brad Buckingham 2012-09-20 21:05:10 UTC
*** Bug 859218 has been marked as a duplicate of this bug. ***

Comment 4 Tom McKay 2012-10-17 20:02:02 UTC
*** Bug 867596 has been marked as a duplicate of this bug. ***

Comment 5 Marek Hulan 2013-01-24 15:04:55 UTC
I believe that this one is related to current changes of manifest import, namely bug #790064 and #896265. I suggest review it once PR with changes is merged so I retake it and I will raise discussion when PR is merged.

Comment 6 Marek Hulan 2013-01-29 15:34:59 UTC
I changed this behavior in katello master - commit https://github.com/Katello/katello/commit/f7938ea06c40d50e16f3923b90d927a7b200ec75 so now it won't raise error, just inform user via green notification.

More info in pull request https://github.com/Katello/katello/pull/1456 and wiki https://fedorahosted.org/katello/wiki/ManifestImportErrorHandlingDesign

So now import should finish with success state even when CDN has some problems. Should we still change Upload History or is it OK now? If it's OK, it means that this PR solved this issue already and should be moved to POST.

Comment 7 Tom McKay 2013-01-29 19:51:13 UTC
There is still an issue in that the "Manifest History" shown is only displayed from candlepin. So if, for example, pulp is completely down and an exception is thrown, the async job will rollback the candlepin results, clearing the subscriptions imported there. The "Manifest History" will just show the candlepin message of "import successful" while a red error dialog will popup.

In other words, the "Manifest History" incorrectly states that the import was successful when the overall task failed.

Comment 8 Marek Hulan 2013-01-30 07:52:15 UTC
I see, thank you for clarification. So if pulp is unreacheable we'll display error in Manifest History.

Comment 9 Mike McCune 2014-03-18 17:38:11 UTC
This bug was closed because of a lack of activity.  If you feel this bug should be reconsidered for attention please feel free to re-open the bug with a comment stating why it should be reconsidered.