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
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?
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 ;).
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
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