Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1804826

Summary: balanceSimilarNodeGroups doesn't work
Product: OpenShift Container Platform Reporter: Alberto <agarcial>
Component: Cloud ComputeAssignee: Alberto <agarcial>
Cloud Compute sub component: Other Providers QA Contact: Jianwei Hou <jhou>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: agarcial, vlaad, zhsun
Version: 4.4Keywords: Regression
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1803639 Environment:
Last Closed: 2020-05-15 16:11:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1803639    
Bug Blocks:    

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