From 57276324516d7f76991df38e7b18f7be2021ebdf Mon Sep 17 00:00:00 2001 From: Kubernetes Prow Robot Date: Mon, 3 May 2021 14:54:07 -0700 Subject: [PATCH] Merge pull request #3797 from DataDog/aws-not-refreshes-dogpiles aws: Don't pile up successive full refreshes during AWS scaledowns --- cluster-autoscaler/cloudprovider/aws/aws_manager.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/aws/aws_manager.go b/cluster-autoscaler/cloudprovider/aws/aws_manager.go index 5352d5794f49..c0fc6f639ab3 100644 --- a/cluster-autoscaler/cloudprovider/aws/aws_manager.go +++ b/cluster-autoscaler/cloudprovider/aws/aws_manager.go @@ -284,8 +284,9 @@ func (m *AwsManager) DeleteInstances(instances []*AwsInstanceRef) error { if err := m.asgCache.DeleteInstances(instances); err != nil { return err } - klog.V(2).Infof("Some ASG instances might have been deleted, forcing ASG list refresh") - return m.forceRefresh() + klog.V(2).Infof("DeleteInstances was called: scheduling an ASG list refresh for next main loop evaluation") + m.lastRefresh = time.Now().Add(-refreshInterval) + return nil } // GetAsgNodes returns Asg nodes.