Skip to content

Commit a06b1c9

Browse files
committed
decerement cache by the proper amount
1 parent f48b26e commit a06b1c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster-autoscaler/cloudprovider/azure/azure_scale_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ func (scaleSet *ScaleSet) DeleteInstances(instances []*azureRef) error {
452452
// Proactively decrement scale set size so that we don't
453453
// go below minimum node count if cache data is stale
454454
scaleSet.sizeMutex.Lock()
455-
scaleSet.curSize--
455+
scaleSet.curSize -= int64(len(instanceIDs))
456456
scaleSet.sizeMutex.Unlock()
457457

458458
go scaleSet.waitForDeleteInstances(future, requiredIds)

0 commit comments

Comments
 (0)