Skip to content

Commit

Permalink
Merge pull request #4787 from marwanad/updating-state-and-cache
Browse files Browse the repository at this point in the history
remove check for returning in-memory size when VMSS is in updating state
  • Loading branch information
k8s-ci-robot authored Apr 6, 2022
2 parents 2983d27 + 542e919 commit 1fa0716
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (

"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
)

var (
Expand Down Expand Up @@ -154,12 +153,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 1fa0716

Please sign in to comment.