Bug 1828958

Summary: Condition: ManagementStateDegraded is shown on a non-degraded operator
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, spadgett, yanpzhan, yapei
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the operand list in the Installed Operators page could show a status from the custom resource `status.conditions` where the condition did not have `status: true`. The web console will now only show a status for a condition with `status: true`.
Story Points: ---
Clone Of:
: 1829591 (view as bug list) Environment:
Last Closed: 2020-07-13 17:32: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:
Bug Depends On:    
Bug Blocks: 1829591    
Attachments:
Description Flags
screenshot none

Description Jan Safranek 2020-04-28 16:30:46 UTC
Created attachment 1682551 [details]
screenshot

Description of problem:
Console shows that an operator is degraded, while Degraded condition is "False".

An operator managed by OLM has these conditions on its CR:
status:
  conditions:
    - lastTransitionTime: '2020-04-28T16:24:47Z'
      status: 'False'
      type: ManagementStateDegraded
    - lastTransitionTime: '2020-04-28T16:24:51Z'
      status: 'False'
      type: Degraded
    - lastTransitionTime: '2020-04-28T16:25:03Z'
      reason: AsExpected
      status: 'False'
      type: Progressing
    - lastTransitionTime: '2020-04-28T16:24:51Z'
      status: 'True'
      type: PrereqsSatisfied
    - lastTransitionTime: '2020-04-28T16:24:51Z'
      status: 'True'
      type: Upgradeable
    - lastTransitionTime: '2020-04-28T16:25:03Z'
      status: 'True'
      type: Available

Not sure why "Degraded" was chosen to be shown. "Available" is the most interesting one (but how can we tell Console that?)

Version-Release number of selected component (if applicable):
Server Version: 4.5.0-0.nightly-2020-04-28-084038

How reproducible:
Always

Steps to Reproduce:
1. Install AWS EBS CSI driver operator and create a CR for it.
(but the operator is not available in OLM yet... use QA registry)

See attached screenshot.

Comment 3 Yadan Pei 2020-05-08 06:40:18 UTC
> (but the operator is not available in OLM yet... use QA registry)

Could you please share me how to create this QA registry? That means how can I get manifests for AWS EBS CSI driver operator? Thanks

Comment 4 Yanping Zhang 2020-05-15 09:29:32 UTC
The bug verification is blocked, since we can't get AWS EBS CSI driver operator installed successfully. Do we have instructions/files about how to install AWS EBS CSI driver operator manually?

Comment 5 Jan Safranek 2020-05-15 13:00:54 UTC
I tested today's 4.5 (Server Version: 4.5.0-0.nightly-2020-05-15-045750) and this bug is fixed.

To get AWS EBS CSI operator into the catalog, get AWS cluster (!) and apply this yaml file :


apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: aws-driver-manifests
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/jsafrane/olm-index:1.0.0

After a while you should see "AWS EBS CSI Operator" in operator hub. Install it, create a CR for it:

apiVersion: csi.openshift.io/v1alpha1
kind: AWSEBSDriver
metadata:
  name: cluster
  labels: {}
spec:
  managementState: Managed

The operator should install CSI driver in a minute or two and CR conditions should stabilize (Available=True, Progressing=False are the most important).

Comment 6 Yanping Zhang 2020-05-18 04:05:32 UTC
Checked on ocp 4.5 cluster with payload: 4.5.0-0.nightly-2020-05-17-201019
Create CS and CR with files in Comment 5, install "AWS EBS CSI Operator" from operator hub, on installed operators page, it shows "Succeed" for Status. Check the conditions by command 
#oc get awsebsdrivers.csi.openshift.io cluster -o yaml
  status:
    conditions:
    - lastTransitionTime: "2020-05-18T03:56:23Z"
      status: "False"
      type: ManagementStateDegraded
    - lastTransitionTime: "2020-05-18T03:56:28Z"
      status: "False"
      type: Degraded
    - lastTransitionTime: "2020-05-18T03:57:49Z"
      reason: AsExpected
      status: "False"
      type: Progressing
    - lastTransitionTime: "2020-05-18T03:56:28Z"
      status: "True"
      type: PrereqsSatisfied
    - lastTransitionTime: "2020-05-18T03:56:28Z"
      status: "True"
      type: Upgradeable
    - lastTransitionTime: "2020-05-18T03:57:49Z"
      status: "True"
      type: Available
conditions are shown correctly.
The bug is fixed, so move it to Verified.
Thanks for Jan's help.

Comment 7 errata-xmlrpc 2020-07-13 17:32: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, 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:2409