Skip to content

Commit

Permalink
Merge pull request #3717 from TymonLee/lzt/opensource/fix_vgpu_nil_po…
Browse files Browse the repository at this point in the history
…inter

fix: nil pointer when set node other resources
  • Loading branch information
volcano-sh-bot authored Sep 29, 2024
2 parents 2d768d6 + 0a0c06d commit 6bd27a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/scheduler/api/node_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ func (ni *NodeInfo) SetNode(node *v1.Node) {

// setNodeOthersResource initialize sharable devices
func (ni *NodeInfo) setNodeOthersResource(node *v1.Node) {
if node == nil {
klog.Warningf("received argument of nil node, no need to set other resources for %s", ni.Name)
return
}

ni.Others[GPUSharingDevice] = gpushare.NewGPUDevices(ni.Name, node)
ni.Others[vgpu.DeviceName] = vgpu.NewGPUDevices(ni.Name, node)
IgnoredDevicesList.Set(
Expand Down

0 comments on commit 6bd27a5

Please sign in to comment.