Skip to content

Commit

Permalink
remove check for returning in-memory size when VMSS is in updating state
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanad committed Apr 5, 2022
1 parent 2983d27 commit 00c7dee
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ func (scaleSet *ScaleSet) getCurSize() (int64, error) {
return -1, err
}

// If VMSS state is updating, return the currentSize which would've been proactively incremented or decremented by CA
if set.VirtualMachineScaleSetProperties != nil && strings.EqualFold(to.String(set.VirtualMachineScaleSetProperties.ProvisioningState), string(compute.ProvisioningStateUpdating)) {
klog.V(3).Infof("VMSS %q is in updating state, returning in-memory size: %d", scaleSet.Name, scaleSet.curSize)
return scaleSet.curSize, nil
}

vmssSizeMutex.Lock()
curSize := *set.Sku.Capacity
vmssSizeMutex.Unlock()
Expand Down

0 comments on commit 00c7dee

Please sign in to comment.