Change:
in W0128 10:46:06.683] [38;5;9m[FAIL][0m [0m[sig-node] Device Plugin [Feature:DevicePluginProbe][NodeFeature:DevicePluginProbe][Serial] [38;5;9m[1mDevicePlugin [Serial] [Disruptive] [BeforeEach] [0mCan schedule a pod that requires a device[0m The pod was left by the test case not sure No response No response_ /sig node
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/cc for (revert of )
these tests started failing after got merged?
The test passed after rebasing with the latest code. It should be fixed. Thanks.
It failed for some other remaining pods again.
/reopen
Reopened this issue. <detailsIn response to : /reopen Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
It is still an issue, see It seems that some pods are sometimes not being cleaned up after the test finishes...
Taking a look at Test fails with On kubelet side it was deleted here: The logs show that API server recorded a delete of the pod at but the next test was already running at which is before the pod was deleted. It seems like the test that created namespace (which is ), completed before it deleted all the resources created in the test... edit: The namespace was deleted here: The namespace deletion in the test framework looks async, i.e. I think it will not block to wait until the namespace is deleted... not sure if this is by design or not...
See related slack thread - Namespace deletion is async by design and the test needs to account for this. For this case in particular, since requires no pods to be left over from other tests, we can adjust the BeforeBegin to wait and poll for a bit while all the resources are cleaned up.

Discussion:
import ( "context" <ins> "fmt" </ins> "path/filepath" "regexp" "time"

return nodes == 1 }, time.Minute, time.Second).Should(gomega.BeTrue()) <del> v1alphaPodResources, err = getV1alpha1NodeDevices(ctx) framework.ExpectNoError(err, "should get node local podresources by accessing the (v1alpha) podresources API endpoint") v1PodResources, err = getV1NodeDevices(ctx) framework.ExpectNoError(err, "should get node local podresources by accessing the (v1) podresources API endpoint") </del> // Before we run the device plugin test, we need to ensure // that the cluster is in a clean state and there are no // pods running on this node. <del> gomega.Expect(v1alphaPodResources.PodResources).To(gomega.BeEmpty(), "should have no pod resources") gomega.Expect(v1PodResources.PodResources).To(gomega.BeEmpty(), "should have no pod resources") </del> <ins> // This is done in a gomega.Eventually with retries since a prior test in a different test suite could've run and the deletion of it's resources may still be in progress. // xref: https://issue.k8s.io/115381 gomega.Eventually(ctx, func(ctx context.Context) error { v1alphaPodResources, err = getV1alpha1NodeDevices(ctx) if err != nil { return fmt.Errorf("failed to get node local podresources by accessing the (v1alpha) podresources API endpoint: %v", err) } v1PodResources, err = getV1NodeDevices(ctx) if err != nil { return fmt.Errorf("failed to get node local podresources by accessing the (v1) podresources API endpoint: %v", err) } if len(v1alphaPodResources.PodResources) > 0 { return fmt.Errorf("expected v1alpha pod resources to be empty, but got non-empty resources: %+v", v1alphaPodResources.PodResources) } if len(v1PodResources.PodResources) > 0 { return fmt.Errorf("expected v1 pod resources to be empty, but got non-empty resources: %+v", v1PodResources.PodResources) } return nil }, f.Timeouts.PodDelete, f.Timeouts.Poll).Should(gomega.Succeed()) </ins> ginkgo.By("Scheduling a sample device plugin pod") data, err := e2etestfiles.Read(SampleDevicePluginDSYAML)