Bug 2094239 - custom pool Nodes with 0 nodes are always populated in progress bar
Summary: custom pool Nodes with 0 nodes are always populated in progress bar
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.11.0
Assignee: Robb Hamilton
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-07 09:24 UTC by Yadan Pei
Modified: 2022-08-10 11:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:16:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
0 of 0 (50.01 KB, image/png)
2022-06-07 09:24 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11694 0 None open Bug 2094239: do not show NodesUpdateGroup if there are 0 nodes 2022-06-13 14:43:04 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:16:59 UTC

Description Yadan Pei 2022-06-07 09:24:23 UTC
Created attachment 1887422 [details]
0 of 0

Description of problem:
when we create custom MCP with 0 node, the MCP will be always shown on cluster settings page progress bar, it shows 0 of 0 and progress 0%
it seems an edge case in calculatePercentage https://github.com/openshift/console/blob/master/frontend/public/components/cluster-settings/cluster-settings.tsx#L181~L182 

Version-Release number of selected component (if applicable):
4.11.0-0.nightly-2022-05-25-123329

How reproducible:
Always

Steps to Reproduce:
1. set ocp cluster with updates available
$ oc adm upgrade
Cluster version is 4.11.0-0.nightly-2022-05-25-123329

Upstream: https://amd64.ocp.releases.ci.openshift.org/graph
Channel: stable-4.11

Recommended updates:

  VERSION                            IMAGE
  4.11.0-0.nightly-2022-05-25-193227 registry.ci.openshift.org/ocp/release@sha256:83ca476a63dfafa49e35cab2ded1fbf3991cc3483875b1bf639eabda31faadfd
2. create custom MCP
$ cat infra-mcp.yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
  name: infra
spec:
  machineConfigSelector:
    matchExpressions:
      - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,infra]}
  maxUnavailable: null
  nodeSelector:
    matchLabels:
      node-role.kubernetes.io/infra: ""
  paused: false
$ oc create -f infra-mcp.yaml
3. check mcp details
% oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
infra    rendered-infra-8534ce87a652e2287c4328c412c1b38f    True      False      False      0              0                   0                     0                      7m52s
master   rendered-master-15742df73bc4090d258104970d6e3253   True      False      False      3              3                   3                     0                      70m
worker   rendered-worker-8534ce87a652e2287c4328c412c1b38f   True      False      False      3              3                   3                     0                      70m
4. check cluster settings page

Actual results:
4. in update progress bar, we show 0 of 0 and 0% for 'infra Nodes'

Expected results:
4. since the mcp/infra doesn't contain any node, we may not list them in the progress bar, only mcp are still in progress of updates can be listed in progress bar

Additional info:

Comment 1 Robb Hamilton 2022-06-13 14:07:08 UTC
Good catch, Ya Dan!  This shouldn't happen all that often, but we only want to render the progress bar if the MachineConfigPool has one or more Nodes.

Comment 5 Yadan Pei 2022-06-20 06:43:48 UTC
1. set up 4.11.0-0.nightly-2022-06-15-222801 cluster

$ oc adm upgrade
Cluster version is 4.11.0-0.nightly-2022-06-15-222801

Upstream: https://amd64.ocp.releases.ci.openshift.org/graph
Channel: stable-4.11

Recommended updates:

  VERSION                            IMAGE
  4.11.0-0.nightly-2022-06-18-081846 registry.ci.openshift.org/ocp/release@sha256:9187a5515828609ba136b2087a8ba3b4942acb549ef5ff5e3459aaa6fcb33e05
  4.11.0-0.nightly-2022-06-17-195923 registry.ci.openshift.org/ocp/release@sha256:46cf9fc6ae317357a9a8c52b58756402bc315e032c7596d1a39a4ee9f2542294

2. create infra mcp as in description
3. $ oc get mcp
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
infra    rendered-infra-141b5bd405d1cf2f72586826bbcb936e    True      False      False      0              0                   0                     0                      92s
master   rendered-master-ed4116e64b0814e4a9f0bfa243d39d84   True      False      False      3              3                   3                     0                      7h26m
worker   rendered-worker-141b5bd405d1cf2f72586826bbcb936e   True      False      False      3              3                   3                     0                      7h26m
4. check cluster settings page, the 'infra Node' progress bar is not shown

verified on 4.11.0-0.nightly-2022-06-15-222801

Comment 6 errata-xmlrpc 2022-08-10 11:16:50 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 (Important: OpenShift Container Platform 4.11.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:5069


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