Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2072883

Summary: sometimes monitoring dashboards charts can not be loaded successfully
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: MonitoringAssignee: Andrew Pickering <anpicker>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.11CC: amuller, anpicker, aos-bugs, jfajersk, juzhao, yapei
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:04:38 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:
Attachments:
Description Flags
cpu usage charts not loaded none

Description Yadan Pei 2022-04-07 08:05:36 UTC
Created attachment 1871227 [details]
cpu usage charts not loaded

Description of problem:
when viewing monitoring Dashboards, we can observe many consoleFetch failed errors, in the error messages we can see that sometimes workload/workload_type/namespace value in the fetch request are not set correctly. it seems dropdown default values are not passed properly in consoleFetch, which cause some charts can not be loaded successfully

Version-Release number of selected component (if applicable):
4.11.0-0.nightly-2022-04-01-172551

How reproducible:
very often

Steps to Reproduce:
1. cluster admin user navigate to Observe -> Dashboards page, by default it will load grafana-dashboard-api-performance?apiserver=kube-apiserver&period=5m
2. Choose Kubernetes/Compute Resources/Workload dashboard, by default, it will load workloads from namespace/default, ignore the default behavior and go next
3. In Namespace dropdown, choose 'openshift-console', Type and Workload dropdown will have default values selected, check if 'CPU Usage' data can be loaded successfully, at the same time we monitor `console` and `network` tab output in browser developer tools

Actual results:
3. CPU Usage data is empty, it doesn't show a loader neither show errors.  
If we keep the browser window untouched(didn't scroll or click anything), it will always be empty
and we can see some errors in `console` tab, such as 

consoleFetch failed for url /api/prometheus/api/v1/query_range?start=1649314944.003&end=1649316744.003&step=60&query=sum%28%0A++++node_namespace_pod_container%3Acontainer_cpu_usage_seconds_total%3Asum_irate%7Bcluster%3D%22%22%2C+namespace%3D%22openshift-dns-operator%22%7D%0A++*+on%28namespace%2Cpod%29%0A++++group_left%28workload%2C+workload_type%29+namespace_workload_pod%3Akube_pod_owner%3Arelabel%7Bcluster%3D%22%22%2C+namespace%3D%22openshift-dns-operator%22%2C+workload%3D%22%22%2C+workload_type%3D%22%22%7D%0A%29+by+%28pod%29%0A&timeout=30s DOMException: The user aborted a request.

consoleFetch failed for url /api/prometheus/api/v1/query_range?start=1649313972.901&end=1649315772.901&step=60&query=sum%28%0A++++node_namespace_pod_container%3Acontainer_cpu_usage_seconds_total%3Asum_irate%7Bcluster%3D%22%22%2C+namespace%3D DOMException: The operation was aborted.  penshift-console%22%7D%0A++*+on%28namespace%2Cpod%29%0A++++group_left%28workload%2C+workload_type%29+namespace_workload_pod%3Akube_pod_owner%3Arelabel%7Bcluster%3D%22%22%2C+namespace%3D undefined penshift-console%22%2C+workload%3D%22%22%2C+workload_type%3D%22%22%7D%0A%29+by+%28pod%29%0A&timeout=30s main-chunk-a0290c8f3c7a0ae9b12b.min.js:1

consoleFetch failed for url /api/prometheus/api/v1/query_range?start=1649314944.003&end=1649316744.003&step=60&query=sum%28%0A++++node_namespace_pod_container%3Acontainer_cpu_usage_seconds_total%3Asum_irate%7Bcluster%3D%22%22%2C+namespace%3D%22openshift-dns-operator%22%7D%0A++*+on%28namespace%2Cpod%29%0A++++group_left%28workload%2C+workload_type%29+namespace_workload_pod%3Akube_pod_owner%3Arelabel%7Bcluster%3D%22%22%2C+namespace%3D%22openshift-dns-operator%22%2C+workload%3D%22%22%2C+workload_type%3D%22%22%7D%0A%29+by+%28pod%29%0A&timeout=30s DOMException: The user aborted a request.


Expected results:
charts should be loaded successfully every time we visit the page

Additional info:

Comment 1 Yadan Pei 2022-04-07 08:15:32 UTC
about how it is reproducible, maybe it is sometimes

Comment 3 Junqi Zhao 2022-04-24 08:10:43 UTC
same issue with 4.10.0-0.nightly-2022-04-23-095048

Comment 7 Junqi Zhao 2022-06-24 03:39:05 UTC
see the attached gif, tested with 4.11.0-0.nightly-2022-06-23-092832, Choose Kubernetes/Compute Resources/Workload dashboard, default namespace is default, choose other project, such as openshift-authentication, "CPU Usage" graph would show "No datapoints found." at the first, then can show the graph for "CPU Usage", please confirm if is expected

Comment 11 Andrew Pickering 2022-06-27 03:08:05 UTC
Thanks Junqi. There's an additional issue where in some cases the "No datapoints found" message is briefly shown before the graph is rendered.

Comment 12 Junqi Zhao 2022-06-27 03:24:41 UTC
based on comment 7 and comment 11, the main problem is fixed, set the bug to VERIFIED and split the additional issue to bug 2101274

Comment 15 errata-xmlrpc 2022-08-10 11:04:38 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