File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
cluster-autoscaler/cloudprovider/azure Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -275,10 +275,6 @@ func (scaleSet *ScaleSet) SetScaleSetSize(size int64) error {
275275 return fmt .Errorf ("VMSS %q is still under updating" , scaleSet .Name )
276276 }
277277
278- // Proactively set the VMSS size so autoscaler makes better decisions.
279- scaleSet .curSize = size
280- scaleSet .lastSizeRefresh = time .Now ()
281-
282278 // Update the new capacity to cache.
283279 vmssSizeMutex .Lock ()
284280 vmssInfo .Sku .Capacity = & size
@@ -300,6 +296,10 @@ func (scaleSet *ScaleSet) SetScaleSetSize(size int64) error {
300296 return rerr .Error ()
301297 }
302298
299+ // Proactively set the VMSS size so autoscaler makes better decisions.
300+ scaleSet .curSize = size
301+ scaleSet .lastSizeRefresh = time .Now ()
302+
303303 klog .V (3 ).Infof ("create a goroutine to wait for the result of the virtualMachineScaleSetsClient.CreateOrUpdate request" )
304304 go scaleSet .updateVMSSCapacity (future )
305305
You can’t perform that action at this time.
0 commit comments