Skip to content

Commit

Permalink
Merge pull request #2957 from marwanad/cherry-pick-2096-1.14
Browse files Browse the repository at this point in the history
Cherry-pick #2096: Fix potential SEGV in updateReadinessStat
  • Loading branch information
k8s-ci-robot authored Mar 27, 2020
2 parents f2b4a77 + 8591091 commit f6a94b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cluster-autoscaler/clusterstate/clusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ func (csr *ClusterStateRegistry) updateReadinessStats(currentTime time.Time) {
klog.Warningf("Failed to get nodegroup for %s: %v", unregistered.Node.Name, errNg)
continue
}
if nodeGroup == nil {
klog.Warningf("Nodegroup is nil for %s", unregistered.Node.Name)
continue
}
perNgCopy := perNodeGroup[nodeGroup.Id()]
if unregistered.UnregisteredSince.Add(csr.config.MaxNodeProvisionTime).Before(currentTime) {
perNgCopy.LongUnregistered++
Expand Down

0 comments on commit f6a94b7

Please sign in to comment.