Bug 1948972 - Memory usage for DB Kubernetes / Compute Resources / Namespace (Pods) and Kubernetes / Compute Resources / Namespace (Workloads) include unreasonable query
Summary: Memory usage for DB Kubernetes / Compute Resources / Namespace (Pods) and Kub...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Jan Fajerski
QA Contact: hongyan li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-13 07:44 UTC by hongyan li
Modified: 2021-04-20 07:25 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-20 07:25:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
console DB (132.51 KB, image/png)
2021-04-13 07:48 UTC, hongyan li
no flags Details
DB query (32.59 KB, image/png)
2021-04-13 07:48 UTC, hongyan li
no flags Details

Description hongyan li 2021-04-13 07:44:12 UTC
Description of problem:
Memory usage for DB Kubernetes / Compute Resources / Namespace (Pods) and Kubernetes / Compute Resources / Namespace (Workloads) include unreasonable query 

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-04-09-222447

How reproducible:
always

Steps to Reproduce:
1. Go to Monitoring -> Dashboards
2. Select DB 'Kubernetes / Compute Resources / Pod'
3. Find 'Memory Usage' and there are 'quota - limits' and 'quota - request'
4. click inspect, there are the following query, suppose they should not be included
-------------------------
> scalar(kube_resourcequota{cluster="", namespace="openshift-monitoring",
> type="hard",resource="requests.memory"})
----
> scalar(kube_resourcequota{cluster="", namespace="openshift-monitoring",
> type="hard",resource="limits.memory"})

Actual results:


Expected results:


Additional info:
Same issue exists on 4.7

Comment 1 hongyan li 2021-04-13 07:48:11 UTC
Created attachment 1771550 [details]
console DB

Comment 2 hongyan li 2021-04-13 07:48:43 UTC
Created attachment 1771551 [details]
DB query

Comment 3 Andrew Pickering 2021-04-14 02:00:20 UTC
Is this something you could take a look at Pawel?

I believe the UI is behaving as expected, but the question is whether the dashboard panel's query is correct.

Comment 4 Jan Fajerski 2021-04-16 11:08:45 UTC
I don't see any formal reason for this query to be wrong. The metric kube_resourcequota exists, its just not necessarily set for a given namespaces and in that case nothing is returned for these queries. However when set this is a useful metric to display.

@hongyan li: Any further thoughts on what can be improved here? Otherwise I'll close this soon.

Comment 5 hongyan li 2021-04-16 11:45:19 UTC
Thanks @Jan, I checked again, you are right and you can continue to close it.

Comment 6 Jan Fajerski 2021-04-20 07:25:43 UTC
Thanks everyone, closing.


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