Skip to content

Commit

Permalink
Signed-off-by: limengxuan <391013634@qq.com>
Browse files Browse the repository at this point in the history
add nodelockEnable paremeters,default to false
  • Loading branch information
archlitchi authored and wangyang0616 committed Aug 17, 2023
1 parent f03837a commit 89124f0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/scheduler/api/devices/nvidia/vgpu/device_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ func (gs *GPUDevices) Allocate(kubeClient kubernetes.Interface, pod *v1.Pod) err
klog.Errorln("DeviceSharing err=", err.Error())
return err
}
nodelock.UseClient(kubeClient)
err = nodelock.LockNode(gs.Name, DeviceName)
if err != nil {
return errors.Errorf("node %s locked for lockname gpushare %s", gs.Name, err.Error())
if NodeLockEnable {
nodelock.UseClient(kubeClient)
err = nodelock.LockNode(gs.Name, DeviceName)
if err != nil {
return errors.Errorf("node %s locked for lockname gpushare %s", gs.Name, err.Error())
}
}

annotations := make(map[string]string)
Expand Down

0 comments on commit 89124f0

Please sign in to comment.