Bug 1951901 - incorrect Worker nodes number calculated when nodes have both master and worker role
Summary: incorrect Worker nodes number calculated when nodes have both master and work...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.12.0
Assignee: Yadan Pei
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-21 07:11 UTC by Yadan Pei
Modified: 2023-01-17 19:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* Previously, the wrong calculating method was used when counter master and worker nodes. With this update, the correct worker nodes are calculated when nodes have both the `master` and `worker` role. (link:https://bugzilla.redhat.com/show_bug.cgi?id=1951901[*BZ#1951901*])
Clone Of:
Environment:
Last Closed: 2023-01-17 19:46:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Worker 0 (203.21 KB, image/png)
2021-04-21 07:11 UTC, Yadan Pei
no flags Details
correct worker node count (126.80 KB, image/png)
2022-08-15 09:44 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11896 0 None open Bug 1951901: incorrect Worker nodes number calculated when nodes have… 2022-07-29 13:32:54 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:46:32 UTC

Description Yadan Pei 2021-04-21 07:11:21 UTC
Created attachment 1774009 [details]
Worker 0

Description of problem:
in all in one cluster, a node act both as master and worker, when we count worker nodes the number for worker nodes will be 0 

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

How reproducible:
Always

Steps to Reproduce:
1. setup All in One OCP cluster with 3 masters(workers)
2. goes to Compute -> Nodes, click the Filter dropdown
3.

Actual results:
2. in Role filter, it shows Worker 0

Expected results:
2. since we have three workers, we should show Worker 3

Additional info:

Comment 1 Jakub Hadvig 2021-04-21 09:27:45 UTC
Looks like the `getNodeRole` filter is not taking in count case where master nodes are also workers. Triaging to DevConsole team for further investigation.

Comment 2 Andrew Ballantyne 2021-04-26 14:08:52 UTC
Not a DevConsole issue, triaging to Kubevirt for further investigation.

Comment 3 Yaacov Zamir 2021-04-27 11:36:52 UTC
looks like the code that check if node is worker or admin is in the management console:
https://github.com/openshift/console/blob/473ed7a2e2b3b703e84cd11406f535dea699c9fa/frontend/packages/console-shared/src/selectors/node.ts#L23

moving to management compoenent

Comment 8 Yadan Pei 2022-08-15 09:44:51 UTC
Created attachment 1905542 [details]
correct worker node count

set up single node cluster in which the node are both master and worker, Nodes list filter shows Worker count is 1 and Master count is 1, this is correct

verified on 4.12.0-0.nightly-2022-08-12-053438

Comment 11 errata-xmlrpc 2023-01-17 19:46:24 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.12.0 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-2022:7399


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