Skip to content

Commit

Permalink
fix bug about while GetNodeResourceTopology failed
Browse files Browse the repository at this point in the history
  • Loading branch information
yanxiaoqi932 committed Dec 8, 2023
1 parent 94e8d09 commit b5324f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pkg/scheduler/plugins/numainterpodaffinity/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,9 @@ func (na *NUMAInterPodAffinity) Filter(ctx context.Context, cycleState *framewor
numaList = append(numaList, numaID)
}
}
if len(numaList) == 0 {
return framework.NewStatus(framework.Unschedulable, ErrGetNodeResourceTopology)
}

podAffinity, err := affinityutil.UnmarshalAffinity(pod.Annotations)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions pkg/scheduler/plugins/numainterpodaffinity/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,3 @@ func TestFilter(t *testing.T) {
}
}
}

// func TestParallizer(t *testing.T) {

// }
1 change: 1 addition & 0 deletions pkg/scheduler/plugins/numainterpodaffinity/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (

ErrNUMAInterPodAffinityNotMatch = "node(s) didn't satisfy numa level inter pod affinity rules"
ErrGetPreFilterState = "getPreFilterState failed"
ErrGetNodeResourceTopology = "failed to get Node Resource Topology from cache"
)

type NUMAInterPodAffinity struct {
Expand Down

0 comments on commit b5324f3

Please sign in to comment.