mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-13 20:30:03 +00:00
topologyupdater: Prevent crash with incorrect node id
It's possible for device plugins to advertise non-existent numa node ids that cause topology updater to crash. Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
This commit is contained in:
parent
19a57789ad
commit
2ceafe83b7
1 changed files with 5 additions and 0 deletions
|
@ -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--
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue