Skip to content

Commit

Permalink
fix(*): refresh node instance cache when nodegroup not found in delet…
Browse files Browse the repository at this point in the history
…eCreatedNodesWithErrors
  • Loading branch information
qianlei90 committed May 24, 2023
1 parent 97e4e56 commit b2c20d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cluster-autoscaler/core/static_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b2c20d3

Please sign in to comment.