Bug 1852061 - MachineSets: missing replicas in spec breaks autoscaler
Summary: MachineSets: missing replicas in spec breaks autoscaler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.6.0
Assignee: Joel Speed
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On:
Blocks: 1820654 1827307 1835160
TreeView+ depends on / blocked
 
Reported: 2020-06-29 16:44 UTC by Joel Speed
Modified: 2020-10-27 16:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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
Clone Of: 1820654
Environment:
Last Closed: 2020-10-27 16:10:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift kubernetes-autoscaler pull 158 0 None closed Bug 1852061: Fallback to Status Replicas if Replicas nil when listing NodeGroups 2021-02-02 08:07:59 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:10:55 UTC

Comment 3 sunzhaohua 2020-07-09 07:53:49 UTC
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.

Comment 5 errata-xmlrpc 2020-10-27 16:10:28 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 (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


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