Bug 2091854 - clusteroperator status filter doesn't match all values in Status column
Summary: clusteroperator status filter doesn't match all values in Status column
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.11.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 2092168
TreeView+ depends on / blocked
 
Reported: 2022-05-31 07:40 UTC by Yadan Pei
Modified: 2022-08-10 11:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:15:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Status value 'Unavailable' not found in status filter (140.35 KB, image/png)
2022-05-31 07:40 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11612 0 None open Bug 2091854: Add 'Unavailable' status to clusteroperator status filter 2022-05-31 08:53:39 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:15:34 UTC

Description Yadan Pei 2022-05-31 07:40:10 UTC
Created attachment 1885427 [details]
Status value 'Unavailable' not found in status filter

Description of problem:
clusteroperator Status column shows some status which can not be found in Status filters dropdown, these clusteroperators can not be filtered out

Version-Release number of selected component (if applicable):
4.11.0-0.nightly-2022-05-25-193227

How reproducible:
Always

Steps to Reproduce:
1. monitoring is in Degraded: True, Available: False and Progressing: False status
$ oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.0-0.nightly-2022-05-25-193227   True        False         5h39m   Error while reconciling 4.11.0-0.nightly-2022-05-25-193227: the cluster operator monitoring has not yet successfully rolled out

$ oc get co
NAME                                       VERSION                              AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
authentication                             4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h40m   
baremetal                                  4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h54m   
cloud-controller-manager                   4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h56m   
cloud-credential                           4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h56m   
cluster-autoscaler                         4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h54m   
config-operator                            4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
console                                    4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h45m   
csi-snapshot-controller                    4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
dns                                        4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h54m   
etcd                                       4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h53m   
image-registry                             4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h49m   
ingress                                    4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h50m   
insights                                   4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h48m   
kube-apiserver                             4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h51m   
kube-controller-manager                    4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h53m   
kube-scheduler                             4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h52m   
kube-storage-version-migrator              4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
machine-api                                4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h51m   
machine-approver                           4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
machine-config                             4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h53m   
marketplace                                4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h54m   
monitoring                                 4.11.0-0.nightly-2022-05-25-193227   False       False         True       3h41m   Rollout of the monitoring stack failed and is degraded. Please investigate the degraded status error.
network                                    4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h56m   
node-tuning                                4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h54m   
openshift-apiserver                        4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h50m   
openshift-controller-manager               4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h52m   
openshift-samples                          4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h50m   
operator-lifecycle-manager                 4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
operator-lifecycle-manager-catalog         4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
operator-lifecycle-manager-packageserver   4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h50m   
service-ca                                 4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   
storage                                    4.11.0-0.nightly-2022-05-25-193227   True        False         False      5h55m   

$ oc get co monitoring -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  annotations:
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  creationTimestamp: "2022-05-31T00:39:58Z"
  generation: 1
  name: monitoring
  ownerReferences:
  - apiVersion: config.openshift.io/v1
    kind: ClusterVersion
    name: version
    uid: 61056d18-5a91-4772-b6d8-49c6dfc3ca54
  resourceVersion: "144271"
  uid: 7c720035-e75e-4a0c-a91f-369c0ca19b35
spec: {}
status:
  conditions:
  - lastTransitionTime: "2022-05-31T02:56:14Z"
    message: 'Failed to rollout the stack. Error: updating prometheus-k8s: reconciling
      Prometheus object failed: updating Prometheus object failed: Prometheus.monitoring.coreos.com
      "k8s" is invalid: spec.retentionSize: Invalid value: "10": spec.retentionSize
      in body should match ''(^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$'''
    reason: UpdatingPrometheusK8SFailed
    status: "True"
    type: Degraded
  - lastTransitionTime: "2022-05-31T00:49:29Z"
    status: "True"
    type: Upgradeable
  - lastTransitionTime: "2022-05-31T02:56:14Z"
    message: Rollout of the monitoring stack failed and is degraded. Please investigate
      the degraded status error.
    reason: UpdatingPrometheusK8SFailed
    status: "False"
    type: Available
  - lastTransitionTime: "2022-05-31T06:37:19Z"
    message: Rollout of the monitoring stack failed and is degraded. Please investigate
      the degraded status error.
    reason: UpdatingPrometheusK8SFailed
    status: "False"
    type: Progressing
  extension: null
  relatedObjects:
  - group: ""
    name: openshift-monitoring
    resource: namespaces
  - group: ""
    name: openshift-user-workload-monitoring
    resource: namespaces
  - group: monitoring.coreos.com
    name: ""
    resource: servicemonitors
  - group: monitoring.coreos.com
    name: ""
    resource: podmonitors
  - group: monitoring.coreos.com
    name: ""
    resource: prometheusrules
  - group: monitoring.coreos.com
    name: ""
    resource: alertmanagers
  - group: monitoring.coreos.com
    name: ""
    resource: prometheuses
  - group: monitoring.coreos.com
    name: ""
    resource: thanosrulers
  - group: monitoring.coreos.com
    name: ""
    resource: alertmanagerconfigs
  versions:
  - name: operator
    version: 4.11.0-0.nightly-2022-05-25-193227
2. view cluster operator status on Cluster Settings -> ClusterOperators page 

Actual results:
2. co/monitoring is shown with Unavailable status, but in Status filter dropdown, we only have 'Available', 'Progressing', 'Degraded', 'Cannnot update' and 'Unknown' statuses, this will cause co/monitoring can not be filtered out with Status

Expected results:
2. ClusterOperators status filter should match with Status column

Additional info:

Comment 2 Yadan Pei 2022-06-01 10:34:51 UTC
1. in terminal one
$ cat <<EOF >co.yaml 
apiVersion: config.openshift.io/v1
kind: ClusterOperator
metadata:
  name: testing
spec: {}
EOF
$ oc apply -f co.yaml
$ oc proxy &

2. in another terminal
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": [{"lastTransitionTime": "2021-06-01T01:01:01Z","type": "Available", "status": "False", "reason": "Testing Available false", "message": "Testing Available false"},{"lastTransitionTime": "2021-06-01T01:01:01Z","type": "Progressing", "status": "False", "reason": "Testing Progressing false", "message": "Testing Progressing false"},{"lastTransitionTime": "2021-06-01T01:01:01Z","type": "Upgradeable", "status": "True", "reason": "Testing Upgradeable true", "message": "Testing Upgradeable true"},{"lastTransitionTime": "2021-06-01T01:01:01Z","type": "Degraded", "status": "True", "reason": "Testing Degraded true", "message": "Testing Degraded true"}]}}]'

3. Check clusteroperator/testing status on Cluster Settings -> ClusterOperators page, it is shown  Unavailable in the table, now since we added a matching  Unavailable status filter, the Unavailable operator now can be filtered out

Comment 4 errata-xmlrpc 2022-08-10 11:15:13 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 (Important: OpenShift Container Platform 4.11.0 bug fix and 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:5069


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