Change:
pull-kubernetes-integration: scheduler TestRequeueByBindFailure Running with stress reproduces the flake Not sure, seeing a lot of retests on pull-kubernetes-integration Bind logic in scheduler integration tests just changed 3 days ago in , not sure if that's related No response No response /sig scheduling /priority important-soon cc
I doesn't look related to the latest change you were also looking at Bind. Any ideas?
It's a little strange because the error reports but since the bind-plugin will fail for the first calling time and there's no kubelet, that means the pod status will be kept since. I created another PR to help output the error message, which maybe helpful for analysis.
This test is very straightforward: the first try to bind "pod-1", the Pod is rejected by the binding plugin. () scheduling queue puts back this "pod-1" to activeQ/backoffQ directly, and "pod-1" will soon come back to the scheduling cycle. the second try to bind "pod-1", it's successful. And, means that (1) doesn't reject "pod-1" correctly. And I don't have any idea why it can happen. The only scenario I can think of is that there is somehow another Pod created before pod-1. When is executed , is it possible that any other Pods (like system ones) are created automatically?
/triage accepted current top flake of integration
/assign I've got one possible scenario, will have a quick fix.

Discussion:
// TestRequeueByBindFailure verify Pods failed by bind plugin are // put back to the queue regardless of whether event happens or not. func TestRequeueByBindFailure(t *testing.T) { <ins> fakeBind := &firstFailBindPlugin{} </ins> registry := frameworkruntime.Registry{ <del> "firstFailBindPlugin": newFirstFailBindPlugin, </del> <ins> "firstFailBindPlugin": func(o runtime.Object, fh framework.Handle) (framework.Plugin, error) { binder, err := defaultbinder.New(nil, fh) if err != nil { return nil, err } fakeBind.defaultBinderPlugin = binder.(framework.BindPlugin) return fakeBind, nil }, </ins> } cfg := configtesting.V1ToInternalWithDefaults(t, configv1.KubeSchedulerConfiguration{ Profiles: []configv1.KubeSchedulerProfile{{ SchedulerName: pointer.String(v1.DefaultSchedulerName),

t.Fatalf("Failed to create Pod %q: %v", pod.Name, err) } <del> // first binding try should fail. err := wait.PollUntilContextTimeout(ctx, 200*time.Millisecond, wait.ForeverTestTimeout, false, testutils.PodSchedulingError(cs, ns, pod.Name)) </del> <ins> // 1. first binding try should fail. // 2. The pod should be enqueued to activeQ/backoffQ without any event. // 3. The pod should be scheduled in the second binding try. // Here, waiting until (3). err := wait.PollUntilContextTimeout(ctx, 200*time.Millisecond, wait.ForeverTestTimeout, false, testutils.PodScheduled(cs, ns, pod.Name)) </ins> if err != nil { <del> t.Fatalf("Expect pod-1 to be rejected by the bind plugin: %v", err) </del> <ins> t.Fatalf("Expect pod-1 to be scheduled by the bind plugin: %v", err) </ins> } <del> // The pod should be enqueued to activeQ/backoffQ without any event. // The pod should be scheduled in the second binding try. err = wait.PollUntilContextTimeout(ctx, 200*time.Millisecond, wait.ForeverTestTimeout, false, testutils.PodScheduled(cs, ns, pod.Name)) if err != nil { </del> <ins> // Make sure the first binding trial was failed, and this pod is scheduled at the second trial. if fakeBind.counter != 1 { </ins> t.Fatalf("Expect pod-1 to be scheduled by the bind plugin in the second binding try: %v", err) } }

defaultBinderPlugin framework.BindPlugin } <del> func newFirstFailBindPlugin(_ runtime.Object, handle framework.Handle) (framework.Plugin, error) { binder, err := defaultbinder.New(nil, handle) if err != nil { return nil, err } return &firstFailBindPlugin{ defaultBinderPlugin: binder.(framework.BindPlugin), }, nil } </del> func (*firstFailBindPlugin) Name() string { return "firstFailBindPlugin" }