Bug 1774653

Summary: Incorrect cluster memory and disk usage displayed in openshift dashboard.
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Rastislav Wagner <rawagner>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.zCC: alegrand, anpicker, aos-bugs, dkiselev, erooth, hasha, jokerman, kakkoyun, lcosic, mloibl, mviaches, pgier, pkrupa, surbania
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1759945 Environment:
Last Closed: 2019-12-11 22:36:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1759945    
Bug Blocks: 1754459    

Comment 3 shahan 2019-12-02 05:46:12 UTC
It seems the console still using the wrong query on dashboard for memory/cpu/disk
cluster:cpu_usage_cores:sum[60m:5m]
(sum(node_filesystem_size_bytes) - sum(node_filesystem_free_bytes))[60m:5m]
cluster:memory_usage_bytes:sum[60m:5m]
 and get error on prometheus UI:
Error executing query: invalid expression type "range vector" for range query, must be Scalar or instant Vector
It is better to remove '[60m:5m]' to avoid confusing others. Or change url to "https://prometheus-k8s-openshift-monitoring.apps.***/graph?g0.range_input=1h&g0.expr=cluster%3Acpu_usage_cores%3Asum%5B60m%3A5m%5D&g0.tab=1"  with 'tab=1'

4.2.0-0.nightly-2019-11-28-230858

Comment 4 Rastislav Wagner 2019-12-02 15:41:08 UTC
@shahan the issue is that in 4.2 we are still using range selector for prometheus 'query' endpoint which results in an error when opening prometheus UI as you described. The queries are fixed however. If we need to switch to 'query_range' endpoint for 4.2 too than we should open a new bug and not reopen this one IMO.

Comment 5 shahan 2019-12-03 02:53:27 UTC
agree for close this, then open another bug for tracking.
Verified this bug

Comment 7 errata-xmlrpc 2019-12-11 22:36:10 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, 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/RHBA-2019:4093