Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherry pick some bugfix to release1.5 #1968

Merged
merged 2 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/scheduler/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,12 @@ func (sc *SchedulerCache) AddBindTask(taskInfo *schedulingapi.TaskInfo) error {
return err
}

err = taskInfo.SetPodResourceDecision()
if err != nil {
return fmt.Errorf("set task %v/%v resource decision failed, err %v", task.Namespace, task.Name, err)
}
task.NumaInfo = taskInfo.NumaInfo.Clone()

// Add task to the node.
if err := node.AddTask(task); err != nil {
// After failing to update task to a node we need to revert task status from Releasing,
Expand Down
3 changes: 3 additions & 0 deletions pkg/scheduler/plugins/numaaware/numaaware.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const (
)

type numaPlugin struct {
sync.Mutex
// Arguments given for the plugin
pluginArguments framework.Arguments
hintProviders []policy.HintProvider
Expand Down Expand Up @@ -142,6 +143,8 @@ func (pp *numaPlugin) OnSessionOpen(ssn *framework.Session) {
}
}

pp.Lock()
defer pp.Unlock()
if _, ok := pp.assignRes[task.UID]; !ok {
pp.assignRes[task.UID] = make(map[string]api.ResNumaSets)
}
Expand Down