Bug 1782593

Summary: Accessing deleted tasks link in monitoring redirects to blank page
Product: Red Hat Satellite Reporter: Lai <ltran>
Component: Content ManagementAssignee: James Jeffers <jjeffers>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: jjeffers, pcreech
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:28:06 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
searching deleted product none

Description Lai 2019-12-11 22:10:35 UTC
Description of problem:
Tested out a CRUD test case and found that when you delete a product and then try to go and access the deleted task in Monitor -> Tasks, you'll be redirected to an error page.

Version-Release number of selected component (if applicable):
6.7.0_05

How reproducible:
90%

Steps to Reproduce:
1. Created a product
2. Delete the product
3. Monitor -> tasks and search for "label = Actions::Katello::Product::Destroy and resource_id = <product_id>."

Actual results:
Redirected to a blank error page.

Expected results:
Directed to the task loading page with the green bar.

Additional info:

Comment 3 James Jeffers 2019-12-19 13:07:16 UTC
While attempting a local reproduction I noticed that the task links were created with a suspicious URL (an href with a "null" instead of a task id). Can QE confirm that the link is similar on your end? Or did the link appear to be correct, including the task id (with a UUID, etc)?

Comment 4 Lai 2020-01-03 15:41:32 UTC
Steps to test:

1. Create product
2. Delete product
3. Monitor -> tasks and search for "label = Actions::Katello::Product::Destroy and resource_id = <product_id>."
4. Click on deleted product task that appears.

Expected Result: Directed to task with loading green bar.

Actual Result: Directed to task with loading green bar.

5. Repeat 3 but click "search" twice.
6. Click on deleted product task that appears.

Expected result: directed to task with loading green bar.

Actual result: Redirected to blank error page.

Additional info:
Please see attach video.  It's strange that if you search the task and click on search twice, the deleted task appears twice in the search result and both have "null" in the URL link as James pointed out.  And once clicked on it, it gets redirected to the error page.

Tested on 6.7.0_07

Comment 5 Lai 2020-01-03 15:42:23 UTC
Created attachment 1649456 [details]
searching deleted product

Comment 6 James Jeffers 2020-01-03 15:58:05 UTC
Based on some investigation, it looks like the seach query is returning a result set with NULL ids from the list of dynflow tasks.

I've narrowed down the source to within a foreman-tasks controller.

Comment 7 Partha Aji 2020-01-03 21:36:13 UTC
Connecting redmine issue https://projects.theforeman.org/issues/28634 from this bug

Comment 8 James Jeffers 2020-01-08 17:53:18 UTC
Solution for this defect will be

Comment 9 James Jeffers 2020-01-08 17:54:41 UTC
I was going to mentioned that the defect will be fixed in foreman-tasks v1.0.1, but it's not clear which snap that will appear in.

Comment 10 Lai 2020-01-22 19:19:28 UTC
Steps to test:

1. Create product
2. Delete product
3. Monitor -> tasks and search for "label = Actions::Katello::Product::Destroy and resource_id = <product_id>."
4. Click on deleted product task that appears.

Expected Result: Directed to task with loading green bar.

Actual Result: Directed to task with loading green bar.

5. Repeat 3 but click "search" twice.
6. Click on deleted product task that appears.

Expected result: directed to task with loading green bar.

Actual result: directed to task with loading green bar.

Tested on 6.7.0_09

Marking issue as verified.

Comment 13 errata-xmlrpc 2020-04-14 13:28:06 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-2020:1454