Bug 2072883 - sometimes monitoring dashboards charts can not be loaded successfully
Summary: sometimes monitoring dashboards charts can not be loaded successfully
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Andrew Pickering
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-07 08:05 UTC by Yadan Pei
Modified: 2022-08-10 11:04 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:04:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cpu usage charts not loaded (410.26 KB, image/png)
2022-04-07 08:05 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11730 0 None open Bug 2072883: Fix dashboard graph width tracking 2022-06-20 10:11:40 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:04:59 UTC

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


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