From b2c20d3a3b5c4c079457d7f847d79486999428a0 Mon Sep 17 00:00:00 2001 From: "qianlei.qianl" Date: Thu, 16 Feb 2023 19:06:53 +0800 Subject: [PATCH] fix(*): refresh node instance cache when nodegroup not found in deleteCreatedNodesWithErrors --- cluster-autoscaler/core/static_autoscaler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cluster-autoscaler/core/static_autoscaler.go b/cluster-autoscaler/core/static_autoscaler.go index afb860c5a1c4..c491966a1abd 100644 --- a/cluster-autoscaler/core/static_autoscaler.go +++ b/cluster-autoscaler/core/static_autoscaler.go @@ -745,6 +745,7 @@ func (a *StaticAutoscaler) deleteCreatedNodesWithErrors() (bool, error) { continue } if nodeGroup == nil || reflect.ValueOf(nodeGroup).IsNil() { + a.clusterStateRegistry.RefreshCloudProviderNodeInstancesCache() return false, fmt.Errorf("node %s has no known nodegroup", node.GetName()) } nodesToBeDeletedByNodeGroupId[nodeGroup.Id()] = append(nodesToBeDeletedByNodeGroupId[nodeGroup.Id()], node)