Bug 1923894

Summary: "installed" operator status in operatorhub page does not reflect the real status of operator
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6.zCC: aos-bugs, jiazha, jokerman
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1926121 (view as bug list) Environment:
Last Closed: 2021-02-24 15:57:46 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:
Bug Depends On:    
Bug Blocks: 1926121    
Attachments:
Description Flags
pic1
none
pic2
none
pic3 none

Description liujia 2021-02-02 07:23:41 UTC
Description of problem:
Try to install "openshift update service" operator from console. Due to fail to pull image in disconnect env, my operator installation failed. 

However, when navigating Operators → OperatorHub page, it shows osus operator in "installed" status(refer to pic1), when i click "openshift update service" operator, it redirects to another page with a link "view it here"(refer to pic2). Clicking "view it here", it redirects a new page "Installed Operators", and there is not "openshift update service" operator shown in this page(refer to pic3) 

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

How reproducible:
always

Steps to Reproduce:
1. 
2.
3.

Actual results:
"installed" status does not reflects the real status of operator installation

Expected results:
"installed" status in "operatorhub" page should reflect the correct status of operator and should comply with "installed operators" page

Additional info:
Confirmed with related QE, more info provided here for debug.
# ./oc get sub update-service-operator -oyaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  creationTimestamp: "2021-02-02T04:12:21Z"
  generation: 1
  labels:
    operators.coreos.com/update-service-operator.openshift-update-service: ""
  managedFields:
  - apiVersion: operators.coreos.com/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        .: {}
        f:channel: {}
        f:installPlanApproval: {}
        f:name: {}
        f:source: {}
        f:sourceNamespace: {}
        f:startingCSV: {}
    manager: Mozilla
    operation: Update
    time: "2021-02-02T04:12:21Z"
  - apiVersion: operators.coreos.com/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        f:config:
          .: {}
          f:resources: {}
      f:status:
        .: {}
        f:catalogHealth: {}
        f:conditions: {}
        f:currentCSV: {}
        f:installPlanGeneration: {}
        f:installPlanRef:
          .: {}
          f:apiVersion: {}
          f:kind: {}
          f:name: {}
          f:namespace: {}
          f:resourceVersion: {}
          f:uid: {}
        f:installplan:
          .: {}
          f:apiVersion: {}
          f:kind: {}
          f:name: {}
          f:uuid: {}
        f:lastUpdated: {}
        f:state: {}
    manager: catalog
    operation: Update
    time: "2021-02-02T04:12:21Z"
  - apiVersion: operators.coreos.com/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:operators.coreos.com/update-service-operator.openshift-update-service: {}
    manager: olm
    operation: Update
    time: "2021-02-02T04:12:21Z"
  name: update-service-operator
  namespace: openshift-update-service
  resourceVersion: "64758"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-update-service/subscriptions/update-service-operator
  uid: 52223a69-830c-4255-bc56-d6f6ce649061
spec:
  channel: v1
  installPlanApproval: Automatic
  name: update-service-operator
  source: osus-cs
  sourceNamespace: openshift-marketplace
  startingCSV: update-service-operator.v4.6.0
status:
  catalogHealth:
  - catalogSourceRef:
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      name: osus-cs
      namespace: openshift-marketplace
      resourceVersion: "63783"
      uid: 136ce1ce-2c4a-48d0-a887-8018fce2b0a9
    healthy: true
    lastUpdated: "2021-02-02T04:12:21Z"
  conditions:
  - lastTransitionTime: "2021-02-02T04:12:21Z"
    message: all available catalogsources are healthy
    reason: AllCatalogSourcesHealthy
    status: "False"
    type: CatalogSourcesUnhealthy
  - lastTransitionTime: "2021-02-02T04:12:21Z"
    reason: Installing
    status: "True"
    type: InstallPlanPending
  currentCSV: update-service-operator.v4.6.0
  installPlanGeneration: 1
  installPlanRef:
    apiVersion: operators.coreos.com/v1alpha1
    kind: InstallPlan
    name: install-gxpjt
    namespace: openshift-update-service
    resourceVersion: "64741"
    uid: f28bc771-abb5-4b16-9c09-132d788b0aa5
  installplan:
    apiVersion: operators.coreos.com/v1alpha1
    kind: InstallPlan
    name: install-gxpjt
    uuid: f28bc771-abb5-4b16-9c09-132d788b0aa5
  lastUpdated: "2021-02-02T04:12:21Z"
  state: UpgradePending

Comment 1 liujia 2021-02-02 07:24:08 UTC
Created attachment 1754206 [details]
pic1

Comment 2 liujia 2021-02-02 07:24:48 UTC
Created attachment 1754207 [details]
pic2

Comment 3 liujia 2021-02-02 07:25:12 UTC
Created attachment 1754208 [details]
pic3

Comment 5 liujia 2021-02-08 03:05:07 UTC
Version:
4.7.0-0.nightly-2021-02-06-084550

Tried to install osus operator from console against a disconnected cluster with pulling image error.

1) The issue that osus operator should be shown in "all projects" has been fixed now(Expected).
2) Another issue that "installed" status in "operatorhub" page does not reflect the correct status of operator still existed. After confirm with Console QE, it should be by design, which means related resources have been created, but not means "successful installation" and we can check detail status in "Installed Operators" page(Acceptable).

So move the bug to verify.

Comment 8 errata-xmlrpc 2021-02-24 15:57:46 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.7.0 security, bug fix, and enhancement 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-2020:5633