Skip to content

Commit

Permalink
Merge pull request kubernetes#5521 from qianlei90/fix-delete-panic
Browse files Browse the repository at this point in the history
fix(*): refresh node instance cache when nodegroup not found in deleteCreatedNodesWithErrors
  • Loading branch information
k8s-ci-robot authored Feb 27, 2023
2 parents e8ba4bf + 0d3a642 commit c8d6127
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 @@ -784,6 +784,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 c8d6127

Please sign in to comment.