From ef54dbb5cc83fce07d9eb37b4a4e7fedf06e7bc5 Mon Sep 17 00:00:00 2001 From: Swati Sehgal Date: Wed, 19 Oct 2022 13:50:26 +0100 Subject: [PATCH] node: e2e: device plugins: Add more logs for clarity The device plugin test in https://testgrid.k8s.io/sig-node-release-blocking#node-kubelet-serial-containerd has been flaky for a while now when it runs on the test infrastructure. Locally running this test resulted in test passing without issues. Based on the existing logs, it is not clear why podresource API endpoint is returning 3 pods rather than the expected two pods (device plugin pod and the test pod requesting devices). For more clarity and debugaability on why an addtional pod seems to be appearing we expose the output from podresource API endpoint. Signed-off-by: Swati Sehgal --- test/e2e_node/device_plugin_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/e2e_node/device_plugin_test.go b/test/e2e_node/device_plugin_test.go index 63bfc01e803..35da39f39e6 100644 --- a/test/e2e_node/device_plugin_test.go +++ b/test/e2e_node/device_plugin_test.go @@ -181,6 +181,11 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) { v1PodResources, err := getV1NodeDevices() framework.ExpectNoError(err) + framework.Logf("v1alphaPodResources.PodResources:%+v\n", v1alphaPodResources.PodResources) + framework.Logf("v1PodResources.PodResources:%+v\n", v1PodResources.PodResources) + framework.Logf("len(v1alphaPodResources.PodResources):%+v", len(v1alphaPodResources.PodResources)) + framework.Logf("len(v1PodResources.PodResources):%+v", len(v1PodResources.PodResources)) + framework.ExpectEqual(len(v1alphaPodResources.PodResources), 2) framework.ExpectEqual(len(v1PodResources.PodResources), 2)