Bug 1970011

Summary: “managed by” link goes to the incorrect URL (unlike the correct ownerRef link)
Product: OpenShift Container Platform Reporter: tony.wu
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED ERRATA QA Contact: Xiyun Zhao <xiyuzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: A utility function used for matching operatator-owned resources with their owners was sometimes returning false matches. Consequence: "Managed by" links on operator-owned resource pages sometimes linked to the incorrect operator. Fix: Update the function logic to correctly match owning operators. Result: "Managed by" links now link to the correct operator.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:33:22 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
screen capture - bug__managed_by.mov none

Description tony.wu 2021-06-09 15:50:42 UTC
Created attachment 1789611 [details]
screen capture - bug__managed_by.mov

Description of problem:
“managed by” links to the incorrect URL while the ownerRef links to the correct CSV.


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

How reproducible:
100%

Steps to Reproduce:
1. install Strimzi Operator (pick a project, e.g. "default")
2. goes to “Service Accounts” list page in the same project Strimzi Operator is installed (e.g. project "default") and found "strimzi-cluster-operator" ServiceAccount object owned by Strimzi CSV
3. on the ServiceAccount details page, see “managed by” link on the header and “owner ref” link in the bottom
4. click on the “managed by” link --> check URL, and then go back to ServiceAccount details page
5. click on ownerRef link --> check URL


Actual results:
above step 4:
4. the “managed by” link goes to an incorrect URL (mixed with openshift-gitops-operator.v1.1.1  in URL):
https://console-openshift-console.apps.aballant-2021-06-08.devcluster.openshift.com/k8s/ns/tw/operators.coreos.com~v1alpha1~ClusterServiceVersion/openshift-gitops-operator.v1.1.1/operators.coreos.com~v1alpha1~ClusterServiceVersion/strimzi-cluster-operator.v0.23.0

above step 5:
5. “owner ref” link in the bottom goes to the correct URL:
https://console-openshift-console.apps.aballant-2021-06-08.devcluster.openshift.com/k8s/ns/tw/operators.coreos.com~v1alpha1~ClusterServiceVersion/strimzi-cluster-operator.v0.23.0


Expected results:
"Managed by" link URL shouldn't mix with "openshift-gitops-operator.v1.1.1"

Additional info:

Comment 1 tony.wu 2021-06-09 15:51:18 UTC
See screen capture for details repro steps + issue.

Comment 2 Jon Jackson 2021-06-10 18:06:24 UTC
Came in late in the sprint, will address next sprint.

Comment 5 Xiyun Zhao 2021-07-12 13:04:28 UTC
This bug has been fixed and verified on build 4.9.0-0.nightly-2021-07-10-081034

Verify Step:
1. Login OCP as administrator, navigate to Operators -> OperatorHub page
2. Install Strimzi Operator on default project, waiting for operator successfully installed
2. Goes to “Service Accounts” list page, and use default project, search and found "strimzi-cluster-operator" ServiceAccount object owned by Strimzi CSV
3. On the ServiceAccount details page, see “managed by” link on the header and “owner ref” link in the bottom
4. Check and save the URL for the link of "Managed by", which on the right side of the label of "CSV" under the name of the service account 
5. Check and save the URL for the parameter of "Owner" on the ServiceAccount details page
6. Verify if Step 4 and 5 has same URL, and the content "openshift-gitops-operator.v1.1.1" is not include in it.

Result:
6. Step 4 and 5 has same URL which is point to the Detail page of Strimzi operator. The extra content "openshift-gitops-operator.v1.1.1" has been removed from ""Managed by" link.
   URL is shown as below:
   https://console-openshift-console.apps.qe-ui49-0712.qe.devcluster.openshift.com/k8s/ns/default/operators.coreos.com~v1alpha1~ClusterServiceVersion/strimzi-cluster-operator.v0.23.0

Comment 8 errata-xmlrpc 2021-10-18 17:33:22 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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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-2021:3759