From ceabc4aba8425a2d74016778496764826c3e6f0d Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Fri, 26 Jan 2024 09:44:00 -0800 Subject: [PATCH] DRA: always returns Unschedulable in PostFilter --- .../framework/plugins/dynamicresources/dynamicresources.go | 2 +- .../framework/plugins/dynamicresources/dynamicresources_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 555f60a3f42..63bc916156e 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -806,7 +806,7 @@ func (pl *dynamicResources) PostFilter(ctx context.Context, cs *framework.CycleS if err := state.updateClaimStatus(ctx, pl.clientset, index, claim); err != nil { return nil, statusError(logger, err) } - return nil, nil + return nil, framework.NewStatus(framework.Unschedulable, "deallocation of ResourceClaim completed") } } return nil, framework.NewStatus(framework.Unschedulable, "still not schedulable") diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index faf866e79b7..0a8f9795ac3 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -467,6 +467,7 @@ func TestPlugin(t *testing.T) { Obj() }, }, + status: framework.NewStatus(framework.Unschedulable, `deallocation of ResourceClaim completed`), }, }, },