Cause: The replicas field in the spec of a MachineSet can be set to a nil value
Consequence: The autoscaler cannot determine the current number of replicas within the MachineSet and therefore cannot perform any scaling operations
Fix: If the replicas field is not set within the spec, fall back to the replicas field within the status which comes from the last number of observed replicas by the MachineSet
Result: The autoscaler can make scaling decisions when the spec replicas field is nil, assuming the MachineSet controller has recently synced the number of replicas to the status
verified
clusterversion: 4.6.0-0.nightly-2020-07-07-233934
steps:
1. Edit machineset zhsunaws78-cvvl8-worker-us-east-2c with "replicas: "
2. Create clusterautoscaler
3. Create machineautoscale
$ oc get machineautoscaler
NAME REF KIND REF NAME MIN MAX AGE
worker-c MachineSet zhsunaws78-cvvl8-worker-us-east-2c 1 3 20m
4. Check the autoscale logs,
W0709 07:41:47.928811 1 clusterapi_machineset.go:77] MachineSet "zhsunaws78-cvvl8-worker-us-east-2c" has nil spec.replicas. This is unsupported behaviour. Falling back to status.replicas.
5. Create workload to scale up the cluster, autoscaler could scale up
W0709 07:42:12.166424 1 clusterapi_machineset.go:77] MachineSet "zhsunaws78-cvvl8-worker-us-east-2c" has nil spec.replicas. This is unsupported behaviour. Falling back to status.replicas.
I0709 07:42:12.166474 1 scale_up.go:570] Final scale-up plan: [{openshift-machine-api/zhsunaws78-cvvl8-worker-us-east-2c 1->3 (max: 3)}]
I0709 07:42:12.166506 1 scale_up.go:659] Scale-up: setting group openshift-machine-api/zhsunaws78-cvvl8-worker-us-east-2c size to 3
W0709 07:42:12.365423 1 clusterapi_machineset.go:77] MachineSet "zhsunaws78-cvvl8-worker-us-east-2c" has nil spec.replicas. This is unsupported behaviour. Falling back to status.replicas.
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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196
verified clusterversion: 4.6.0-0.nightly-2020-07-07-233934 steps: 1. Edit machineset zhsunaws78-cvvl8-worker-us-east-2c with "replicas: " 2. Create clusterautoscaler 3. Create machineautoscale $ oc get machineautoscaler NAME REF KIND REF NAME MIN MAX AGE worker-c MachineSet zhsunaws78-cvvl8-worker-us-east-2c 1 3 20m 4. Check the autoscale logs, W0709 07:41:47.928811 1 clusterapi_machineset.go:77] MachineSet "zhsunaws78-cvvl8-worker-us-east-2c" has nil spec.replicas. This is unsupported behaviour. Falling back to status.replicas. 5. Create workload to scale up the cluster, autoscaler could scale up W0709 07:42:12.166424 1 clusterapi_machineset.go:77] MachineSet "zhsunaws78-cvvl8-worker-us-east-2c" has nil spec.replicas. This is unsupported behaviour. Falling back to status.replicas. I0709 07:42:12.166474 1 scale_up.go:570] Final scale-up plan: [{openshift-machine-api/zhsunaws78-cvvl8-worker-us-east-2c 1->3 (max: 3)}] I0709 07:42:12.166506 1 scale_up.go:659] Scale-up: setting group openshift-machine-api/zhsunaws78-cvvl8-worker-us-east-2c size to 3 W0709 07:42:12.365423 1 clusterapi_machineset.go:77] MachineSet "zhsunaws78-cvvl8-worker-us-east-2c" has nil spec.replicas. This is unsupported behaviour. Falling back to status.replicas.