Skip to content

Commit

Permalink
Merge pull request #5806 from qianlei90/cherrypick-5521-1.26
Browse files Browse the repository at this point in the history
[cherry-pick to 1.26] fix(*): refresh node instance cache when nodegroup not found in deleteCreatedNodesWithErrors
  • Loading branch information
k8s-ci-robot authored May 24, 2023
2 parents 97e4e56 + b2c20d3 commit cd86044
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 cd86044

Please sign in to comment.