Bug 1985356 - Console's OperatorHub leads users to unrelated install plan, if subscription does not have its own
Summary: Console's OperatorHub leads users to unrelated install plan, if subscription ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.z
Assignee: ralpert
QA Contact: Xiyun Zhao
URL:
Whiteboard:
Depends On: 1970466
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-23 13:47 UTC by ralpert
Modified: 2021-08-16 18:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-16 18:32:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9735 0 None None None 2021-08-05 02:11:55 UTC
Red Hat Product Errata RHBA-2021:3121 0 None None None 2021-08-16 18:32:22 UTC

Description ralpert 2021-07-23 13:47:09 UTC
This bug was initially created as a copy of Bug #1970466

I am copying this bug because: 
We need to backport a simpler fix to 4.8.z. We fixed this in 4.9 using a new feature, which we will not backport.


Description of problem:
Console leads users to unrelated install plan, if subscription does not have its own

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


How reproducible:
Just create subscription with non-existing starting CSV specified, and check installed operator tab

Steps to Reproduce:
1. Create test namespace.
2. Install any operator into openshift-operators namespace with operator hub IU, like CodeReady Workspaces
3. Import the following YAML
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: ditto-operator
  namespace: test
spec:
  channel: alpha
  installPlanApproval: Automatic
  name: ditto-operator
  source: community-operators
  sourceNamespace: openshift-marketplace
  startingCSV: ditto-operator.v0.non-existing
4. Go to OperatorHub and look for Ditto operator, it's marked as installed.
5. Click on Ditto operator and verify info


Actual results:
Console displays `Version 2.8.0 of this Operator has been installed on the cluster. View it here.` where view it here is a link to CodeReady Workspaces install plan.

Expected results:
OpenShift Console says, at least something like: operator is not installed yet. A suitable CSV is not found yet.

Note: Installed Operators tab reports Unknown state for this operator.

Additional info:

Comment 5 Xiyun Zhao 2021-08-10 03:51:42 UTC
This bug has been fixed on verified on OCP 4.8

Verified Steps:
1. Create test namespace.
2. Install any operator into openshift-operators namespace with operator hub UI, take 'Quary Bridge Operator', 'Akka Cluster Operator' as example
3. Import the following YAML
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: ditto-operator
  namespace: test
spec:
  channel: alpha
  installPlanApproval: Automatic
  name: ditto-operator
  source: community-operators
  sourceNamespace: openshift-marketplace
  startingCSV: ditto-operator.v0.non-existing
4. Go to OperatorHub and look for Ditto operator, Verify if it's marked as installed.
5. Select 'All project' on Installed Operators page, check the status of 'Ditto'
6. Click on Ditto operator and verify the information on the details page

Result:
4. No 'Installed' label can be found under the operator name on OperatorHub page, and also user can not find the operator by using the filter of 'Installed'
5. The Status of the installed operator 'ditto-operator' is marked as "Unknown" on the Operators -> Installed Operators page
6. The details page of Ditto operator is able to open normally, and the status is also marked as 'Unknown'

Comment 7 errata-xmlrpc 2021-08-16 18:32:12 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 (OpenShift Container Platform 4.8.5 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/RHBA-2021:3121


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