Skip to content

Commit

Permalink
Merge pull request volcano-sh#3054 from archlitchi/nodelockrm
Browse files Browse the repository at this point in the history
Add nodelockEnable parameters default to false
  • Loading branch information
volcano-sh-bot authored Aug 14, 2023
2 parents 04a3b1b + 1b4f137 commit 2cd8ae5
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 2cd8ae5

Please sign in to comment.