Bug 1804826 - balanceSimilarNodeGroups doesn't work
Summary: balanceSimilarNodeGroups doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: Alberto
QA Contact: Jianwei Hou
URL:
Whiteboard:
Depends On: 1803639
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-19 17:18 UTC by Alberto
Modified: 2020-05-15 16:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1803639
Environment:
Last Closed: 2020-05-15 16:11:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kubernetes-autoscaler pull 127 0 None closed [release-4.4] BUG 1804826: UPSTREAM: <carry>: openshift: Add topology.kubernetes.io labels to be ignored when comparing ... 2020-05-15 14:35:39 UTC

Description Alberto 2020-02-19 17:18:37 UTC
+++ This bug was initially created as a clone of Bug #1803639 +++

Description of problem:
balanceSimilarNodeGroups doesn't work


Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-16-221315

How reproducible:
Always

Steps to Reproduce:
1. Create clusterautoscaler 
apiVersion: autoscaling.openshift.io/v1
kind: ClusterAutoscaler
metadata:
  name: default
spec:
  balanceSimilarNodeGroups: true
  scaleDown:
    delayAfterAdd: 10s
    delayAfterDelete: 10s
    delayAfterFailure: 10s
    enabled: true
    unneededTime: 10s

2. Create machineautoscalers
$ oc get machineautoscalers
NAME                  REF KIND     REF NAME                          MIN   MAX   AGE
machineautoscaler-a   MachineSet   zhsun44-c9lb2-worker-us-east-2a   1     12    122m
machineautoscaler-b   MachineSet   zhsun44-c9lb2-worker-us-east-2b   1     12    120m
machineautoscaler-c   MachineSet   zhsun44-c9lb2-worker-us-east-2c   1     12    32m

3. Add payload to scale up the cluster


Actual results:
Balance only in 1 group.Couldn't see the "splitting scale-up" message from the cluster-autoscaler.

I0217 04:07:42.367422       1 scale_up.go:431] Best option to resize: openshift-machine-api/zhsun44-c9lb2-worker-us-east-2b
I0217 04:07:42.367449       1 scale_up.go:435] Estimated 6 nodes needed in openshift-machine-api/zhsun44-c9lb2-worker-us-east-2b
I0217 04:07:42.367549       1 scale_up.go:540] Final scale-up plan: [{openshift-machine-api/zhsun44-c9lb2-worker-us-east-2b 1->7 (max: 12)}]
I0217 04:07:42.367576       1 scale_up.go:701] Scale-up: setting group openshift-machine-api/zhsun44-c9lb2-worker-us-east-2b size to 7


$ oc get machineset
NAME                              DESIRED   CURRENT   READY   AVAILABLE   AGE
zhsun44-c9lb2-worker-us-east-2a   1         1         1       1           3h12m
zhsun44-c9lb2-worker-us-east-2b   7         7         7       7           3h12m
zhsun44-c9lb2-worker-us-east-2c   1         1         1       1           3h12m


Expected results:
Balance in 3 groups.

Additional info:

Comment 3 sunzhaohua 2020-02-25 07:38:37 UTC
verfied.

clusterversion: 4.4.0-0.nightly-2020-02-25-015247

I0225 07:29:34.253588       1 scale_up.go:431] Best option to resize: openshift-machine-api/zhsun8-2qtf5-worker-us-east-2b
I0225 07:29:34.253611       1 scale_up.go:435] Estimated 23 nodes needed in openshift-machine-api/zhsun8-2qtf5-worker-us-east-2b
I0225 07:29:34.253734       1 scale_up.go:532] Splitting scale-up between 3 similar node groups: {openshift-machine-api/zhsun8-2qtf5-worker-us-east-2b, openshift-machine-api/zhsun8-2qtf5-worker-us-east-2c, openshift-machine-api/zhsun8-2qtf5-worker-us-east-2a}
I0225 07:29:34.253756       1 scale_up.go:540] Final scale-up plan: [{openshift-machine-api/zhsun8-2qtf5-worker-us-east-2b 1->9 (max: 12)} {openshift-machine-api/zhsun8-2qtf5-worker-us-east-2c 1->9 (max: 12)} {openshift-machine-api/zhsun8-2qtf5-worker-us-east-2a 1->8 (max: 12)}]
I0225 07:29:34.253785       1 scale_up.go:701] Scale-up: setting group openshift-machine-api/zhsun8-2qtf5-worker-us-east-2b size to 9
I0225 07:29:34.265438       1 scale_up.go:701] Scale-up: setting group openshift-machine-api/zhsun8-2qtf5-worker-us-east-2c size to 9
I0225 07:29:34.278938       1 scale_up.go:701] Scale-up: setting group openshift-machine-api/zhsun8-2qtf5-worker-us-east-2a size to 8

$ oc get machineset
NAME                             DESIRED   CURRENT   READY   AVAILABLE   AGE
zhsun8-2qtf5-worker-us-east-2a   8         8         8       8           122m
zhsun8-2qtf5-worker-us-east-2b   9         9         9       9           122m
zhsun8-2qtf5-worker-us-east-2c   9         9         9       9           122m


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