Bug 1918785 - Pod request and limit calculations in console are incorrect
Summary: Pod request and limit calculations in console are incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Clayton Coleman
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1974686 1975147
TreeView+ depends on / blocked
 
Reported: 2021-01-21 14:44 UTC by Clayton Coleman
Modified: 2021-07-27 22:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Fixes an issue where the web console calculated pod requests and limits inaccurately in memory and CPU charts on the project dashboard and pod details pages. Completed pods were not excluded, init containers were not included, and overhead wasn't calculated.
Clone Of:
: 1974686 (view as bug list)
Environment:
Last Closed: 2021-07-27 22:36:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
01 - no request line (105.44 KB, image/png)
2021-01-26 09:26 UTC, Yadan Pei
no flags Details
pod CPU/Memory requests/limits (379.09 KB, image/png)
2021-04-15 07:53 UTC, Yadan Pei
no flags Details
project CPU/Memory requests (163.03 KB, image/png)
2021-04-15 07:57 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8606 0 None open Bug 1918785: Update all resource request/limit queries based on new labels 2021-04-12 22:43:09 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:36:56 UTC

Description Clayton Coleman 2021-01-21 14:44:42 UTC
Our previous metrics were inadequate for calculating pod request and limits - completed pods were supposed to be excluded, init containers were not included, and overhead wasn't calculated. Starting with 4.7 we now have a Kube metric that calculates this correctly from the scheduler - kube_pod_resource_request and kube_pod_resource_limit - and the console can use them quite easily.

Update the console with the new metrics.

Comment 2 Yadan Pei 2021-01-26 09:13:57 UTC
https://github.com/openshift/console/pull/7894 fix PR

Comment 3 Yadan Pei 2021-01-26 09:26:11 UTC
Created attachment 1750838 [details]
01 - no request line

# oc get pods console-664f87d4f-f99fq  -n openshift-console -o json | jq '.spec.containers[0].resources.requests'
{
  "cpu": "10m",
  "memory": "100Mi"
}

On a cluster with PR fix, CPU/Memory Usage charts doesn't show the request line(orange dotted line), see attachment 01 [details] - no request line.

Assigning back for double confirmation

Comment 4 Samuel Padgett 2021-02-05 18:26:56 UTC
I see this as well for the console pod. Assigning back to Clayton. Clayton, let us know if you'd like someone on the console team to investigate.

Comment 9 Yadan Pei 2021-04-15 07:53:58 UTC
Created attachment 1772080 [details]
pod CPU/Memory requests/limits

Comment 10 Yadan Pei 2021-04-15 07:57:22 UTC
Created attachment 1772081 [details]
project CPU/Memory requests

Comment 11 Yadan Pei 2021-04-15 07:59:00 UTC
Pod CPU/Memory requests/limits is shown correctly, see attachment 'pod CPU/Memory requests/limits' 
Project CPU/Memory requests is shown correctly, see attachment 'project CPU/Memory requests'


Verified on 4.8.0-0.nightly-2021-04-13-171608

Comment 14 errata-xmlrpc 2021-07-27 22:36:39 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 (Moderate: OpenShift Container Platform 4.8.2 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-2021:2438


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