Bug 1856353

Summary: OperatorHub screen showing wrong version of the operator when older version is installed
Product: OpenShift Container Platform Reporter: Paul Weil <pweil>
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Currently installed version was not shown in operator details pane on OperatorHub Consequence: User could not tell if currently installed version was latest. Fix: When currently installed operator version is not latest, show the installed version in the operator details pane on OperatorHub. Result: User can see when the installed operator version is not latest.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:13:56 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:

Description Paul Weil 2020-07-13 12:59:40 UTC
The OperatorHub page in the web console is displaying wrong version of my operator if I have installed a previous version of the operator and not the latest.

I installed Knative Serving Operator (0.5.2) in order to perform a rolling upgrade later, but the OperatorHub page at this point already shows the latest available version from the CatalogSource even though it is not installed yet, my steps to reproduce look like this: (and that is the only way I was able to install the previous version and not the latest one from the catalog source):

1) Install CatalogSource from release-v0.6.0 branch of openshift/knative-serving
2) Create knative-serving namespace
3) Install OperatorGroup
4) Install Subscription with:
        installPlanApproval: Manual
        startingCSV: knative-serving-operator.v0.5.2
5) Edit InstallPlan for knative-serving-operator.v0.5.2 and change approved: false -> approved: true (at this point the operator for 0.5.2 is installed)
      (right now the OperatorHub in web console incorrectly displays that 0.6.0 is installed) 
Attaching a screenshot of OperatorHub after installing 0.5.2 version of my operator. And also a picture of the actual operator that is currently installed.

 
See https://issues.redhat.com/browse/CONSOLE-1616 for screenshots

Comment 1 Jon Jackson 2020-07-31 19:47:13 UTC
Will address next sprint.

Comment 2 Jon Jackson 2020-08-21 19:34:36 UTC
Fix in progress, should have a PR up soon.

Comment 5 Yanping Zhang 2020-09-04 13:55:27 UTC
Checked on ocp 4.6 with payload 4.6.0-0.nightly-2020-09-03-191144.
The latest csv version is v2.0.2, but set currentCSV as v2.0.0
#cat couchbase.package.yaml
packageName: couchbase-enterprise
channels:
- name: original
  currentCSV: couchbase-operator.v1.0.0
- name: stable
  currentCSV: couchbase-operator.v2.0.0
defaultChannel: "stable"

Install the couchbase operator, check subscription:
spec:
  channel: stable
  installPlanApproval: Manual
  name: couchbase-enterprise
  source: custom-console-catalogsource-yanpzhan
  sourceNamespace: openshift-marketplace
  startingCSV: couchbase-operator.v2.0.0

On the installed operators page, for couchbase operator, it shows version v2.0.0.

Comment 7 errata-xmlrpc 2020-10-27 16:13:56 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.6 GA Images), 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-2020:4196