Bug 2021702

Summary: optional operator conditions are confusing
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Management ConsoleAssignee: Joe Caiani <jcaiani>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, jhadvig, spadgett, yanpzhan
Target Milestone: ---   
Target Release: 4.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-29 07:16:22 UTC Type: ---
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: 2011038    
Bug Blocks:    

Description OpenShift BugZilla Robot 2021-11-10 01:40:48 UTC
+++ This bug was initially created as a clone of Bug #2011038 +++

Created attachment 1829622 [details]
screenshot

Description of problem:

I installed a partner operator in a 4.8.12 cluster. Looking at the installed operator status page here: https://console-openshift-console.apps.demo.ocp.home/k8s/ns/openshift-operators/operators.coreos.com~v1alpha1~ClusterServiceVersion/blackduck-connector-operator.v1.0.0/

... the "Conditions" at the bottom are confusing, and I don't think it's just this particular operator that's the issue. Screenshot attached.

The ClusterServiceVersion conditions do not have a field called "Status". So when the console shows that every listed condition has a "Status" of "True", that is confusing, and I'm not sure where it's getting or deriving that information.

It's also easy to interpret this table as saying the operator is in all of these conditions at the same time. Based on some quick slack feedback, it seems there might be an expectation that only the most recent condition represents current state. And the entries are expected to be chronological, so the last one is most recent. It would help to figure out what OLM's intent is here and better represent which entries are historical vs. which represent current state.

This may be related to the CSV taking a different approach to conditions than what's in the k8s API conventions doc: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties

The table shown in the UI would probably work fine for conditions created with that approach. But since OLM is taking a different approach with CSVs, it would help a lot to coordinate and provide some sort of hints or visual guidance about what's the current state vs. not. And getting rid of the "Status" column almost certainly makes sense.

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

4.8.12


How reproducible:

always

Steps to Reproduce:
1. install an optional operator (I used Black Duck in this case)
2. Look at its conditions in the console

Actual results:

screenshot attached

Expected results:

Something that makes it clear what the current status is vs what's historical. Also not having the extra "Status" column that isn't in the source data.


Additional info:

Here is the YAML representation of what's in the screenshot:

  conditions:
    - lastTransitionTime: '2021-10-05T16:54:58Z'
      lastUpdateTime: '2021-10-05T16:54:58Z'
      message: requirements not yet checked
      phase: Pending
      reason: RequirementsUnknown
    - lastTransitionTime: '2021-10-05T16:54:58Z'
      lastUpdateTime: '2021-10-05T16:54:58Z'
      message: 'all requirements found, attempting install'
      phase: InstallReady
      reason: AllRequirementsMet
    - lastTransitionTime: '2021-10-05T16:54:58Z'
      lastUpdateTime: '2021-10-05T16:54:58Z'
      message: waiting for install components to report healthy
      phase: Installing
      reason: InstallSucceeded
    - lastTransitionTime: '2021-10-05T16:54:58Z'
      lastUpdateTime: '2021-10-05T16:54:58Z'
      message: >-
        installing: waiting for deployment
        blackduck-connector-operator-controller-manager to become ready:
        deployment "blackduck-connector-operator-controller-manager" not
        available: Deployment does not have minimum availability.
      phase: Installing
      reason: InstallWaiting
    - lastTransitionTime: '2021-10-05T16:55:17Z'
      lastUpdateTime: '2021-10-05T16:55:17Z'
      message: install strategy completed with no errors
      phase: Succeeded
      reason: InstallSucceeded

--- Additional comment from jhadvig on 2021-10-07 08:46:22 UTC ---

Hey Michael, thanks for reporting issue.
Today the installed operator status page is showing the conditions by design, meaning that we are not doing any assumptions and just render the conditions in the given order.
What you are proposing seems valid but it would require also design work. For that reason I would suggest rather to create a RFE in Console's JIRA: 
https://issues.redhat.com/projects/CONSOLE/issue

Sam is this something we would wanna threat as BZ for backport purposes?

--- Additional comment from spadgett on 2021-10-07 16:56:54 UTC ---

I think it's reasonable to align the table with the API on the CSV page as a bug fix (i.e. remove columns like `Status` that aren't in the YAML). Larger changes like differentiating between current and historical conditions require design input and probably should be a story.

--- Additional comment from jhadvig on 2021-10-11 06:38:35 UTC ---

@Joe I would check the API for the CSV, InstallPlan and Subscription condition types and based on the type I would render appropriate table.

Comment 6 errata-xmlrpc 2022-03-29 07:16: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 (OpenShift Container Platform 4.9.26 bug fix 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-2022:1022