Bug 1914427

Summary: Count of pods on the dashboard is incorrect
Product: OpenShift Container Platform Reporter: Clayton Coleman <ccoleman>
Component: Management ConsoleAssignee: Clayton Coleman <ccoleman>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.7CC: abraren, aos-bugs, decarr, jokerman, spadgett, yapei
Target Milestone: ---Keywords: UpcomingSprint
Target Release: 4.7.0   
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-02-24 15:51:26 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:

Description Clayton Coleman 2021-01-08 19:57:53 UTC
The current dashboard query shows running + completed pods.  That is incorrect since a completed pod has no impact on the running system and will be garbage collected as needed (admins don't need to know it).  Instead, the dashboard should show only running pods.

As part of 4.7 we added 'kube_running_pod_ready' which covers only non-terminal pods. Change to use this in the console.

Comment 1 Samuel Padgett 2021-01-08 20:10:46 UTC
*** Bug 1914424 has been marked as a duplicate of this bug. ***

Comment 2 Andy Braren 2021-01-11 15:07:11 UTC
I imagine this change should also be applied to Project Overviews and the Inventory card's Pods row. Clicking "X Pods" in either card should then take the user to the Pods list filtered to exclude any completed/terminal pods.

Comment 3 Clayton Coleman 2021-01-11 20:35:38 UTC
Found a couple more spots, needs another PR or two.

Comment 4 Clayton Coleman 2021-01-21 14:40:54 UTC
Putting this back into MODIFIED, the other changes I was referring to will be a separate bug.

Comment 6 Yadan Pei 2021-01-25 03:12:53 UTC
project dashboard utilization is using query: count(kube_running_pod_ready{namespace='yapei47'}) BY (namespace)
cluster dashboard utilization is using query: count(kube_running_pod_ready)

This is VERIFIED against  4.7.0-0.nightly-2021-01-22-134922

Comment 9 errata-xmlrpc 2021-02-24 15:51:26 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.7.0 security, bug fix, and enhancement 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-2020:5633