1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 08:17:04 +00:00

Merge pull request #783 from tkatila/nfd-topologyupdater-crash

topologyupdater: Prevent crash with incorrect node id
This commit is contained in:
Kubernetes Prow Robot 2022-03-22 12:17:59 -07:00 committed by GitHub
commit 1b16b94778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,6 +246,11 @@ func (noderesourceData *nodeResources) updateAvailable(numaData map[int]map[v1.R
klog.Infof("unknown resource %q: %q", resName, resID)
continue
}
if _, ok := numaData[nodeID]; !ok {
klog.Infof("unknown node id: %q", nodeID)
continue
}
numaData[nodeID][ri.Name].available--
}
}