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

Bug 1948972

Summary: Memory usage for DB Kubernetes / Compute Resources / Namespace (Pods) and Kubernetes / Compute Resources / Namespace (Workloads) include unreasonable query
Product: OpenShift Container Platform Reporter: hongyan li <hongyli>
Component: MonitoringAssignee: Jan Fajerski <jfajersk>
Status: CLOSED NOTABUG QA Contact: hongyan li <hongyli>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.8CC: alegrand, anpicker, erooth, jfajersk, kakkoyun, lcosic, pkrupa, spasquie, surbania
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-20 07:25:43 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
console DB
none
DB query none

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.