Bug 1999836 - Admin web-console inconsistent status summary of sparse ClusterOperator conditions
Summary: Admin web-console inconsistent status summary of sparse ClusterOperator condi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.10.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 2052553
TreeView+ depends on / blocked
 
Reported: 2021-08-31 19:05 UTC by W. Trevor King
Modified: 2022-03-10 16:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2052553 (view as bug list)
Environment:
Last Closed: 2022-03-10 16:06:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10120 0 None open Bug 1999836: Add 'Unavailable' status for cluster operator 2021-09-22 11:43:51 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:06:50 UTC

Description W. Trevor King 2021-08-31 19:05:57 UTC
In a recent 4.8 CI test-cluster, adding a testing ClusterOperator:

$ cat co.yaml 
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  name: testing
spec: {}
$ oc apply -f co.yaml
$ oc proxy &  # working around the lack of --subresource: https://github.com/kubernetes/kubernetes/pull/99556
[1] 16920
Starting to serve on 127.0.0.1:8001
$ curl -k -XPATCH -H "Accept: application/json" -H "Content-Type: application/json-patch+json" 'http://127.0.0.1:8001/apis/config.openshift.io/v1/clusteroperators/testing/status' -d '[{"op": "add", "path": "/status", "value": {"conditions": [...]}}]'
$ fg
oc proxy
^C

Iterating through a few condition values for that patch command, and watching the Status value on ${CONSOLE}/k8s/cluster/config.openshift.io~v1~ClusterOperator/testing gives the following results:

* Available unset, Degraded=True -> Status=Degraded; patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "True", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
* Available unset, Degraded=False -> Status=Unknown; patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
* Available=False, Degraded=False -> Status=Unknown; patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "False", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
* Available=True, Degraded=False -> Status=Available; patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "True", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
* Available=False, Degraded=True -> Status=Degraded; patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "False", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "True", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
* Available=True, Degraded=True -> Status=Degraded; patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "True", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}

I would expect these different results:

* Available=False -> Status=Unavailable
* Available!=False, Degraded=True -> Status=Degraded

Comment 1 Jakub Hadvig 2021-09-21 11:50:40 UTC
Not really sure whats the issue here. After applying the CR and patching the status conditions I've check the Status value on "${CONSOLE}/k8s/cluster/config.openshift.io~v1~ClusterOperator/testing" in Chrome browser Im not really sure what is the issue here. Could you be more specific?

Comment 2 W. Trevor King 2021-09-21 22:32:06 UTC
Current statuses that don't match my expectations:

* Available=False, Degraded=False is currently represented as Status=Unknown, when I'd expect it to be Status=Unavailable.
* Available=False, Degraded=True is currently represented as Status=Degraded, when I'd expect it to be Status=Unavailable (because Available=False is critical, component is missing functionality, while Degraded=True is only a warning, component is missing its service level objectives).

So I'd expect the console logic to adjust, so that the reported Status matches my expectations for those two cases (without breaking the other cases where the console already matches my expectations ;).

Comment 5 Yadan Pei 2021-09-27 06:48:22 UTC
verify the fix following the steps in https://bugzilla.redhat.com/show_bug.cgi?id=1999836#c0

* patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "True", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
Available unset, Degraded=True -> Console: Status=Degraded

* patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
Available unset, Degraded=False -> Console:  Status=Unknown

* patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "False", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
Available=False, Degraded=False -> Console: Status=Unavailable

* patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "True", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
Available=True, Degraded=False -> Console: Status=Available 


* patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "False", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "True", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
Available=False, Degraded=True -> Console: Status=Unavailable


* patch with status.conditions value: {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Available", "status": "True", "reason": "Testing", "message": "Testing available https://example.com/a."}, {"lastTransitionTime": "2021-08-31T01:01:01Z", "type": "Degraded", "status": "False", "reason": "Testing", "message": "Testing degraded https://example.com/a."}
Available=True, Degraded=True -> Console: Status=Available

All status shown in console are matching with expectations in https://bugzilla.redhat.com/show_bug.cgi?id=1999836#c0, so moving to VERIFIED

checked against 4.10.0-0.nightly-2021-09-26-233013

Comment 9 errata-xmlrpc 2022-03-10 16:06:30 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.10.3 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/RHSA-2022:0056


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