From 4b94a1f247074cfce380fbb053aae56af6084528 Mon Sep 17 00:00:00 2001 From: Andrea Panattoni Date: Tue, 9 Apr 2024 10:17:51 +0200 Subject: [PATCH] e2e: `Debug logging should be visible in multus pod` flake Use `Pod.Status.StartTime` field to infer the timestamp lower bound of interested log lines. This field is populated by the kubelet, so it uses the same clock as the multus pod logs. Prior to this commit, `Meta.CreationTimestamp` field was used. That field is populated by the API server, which can have a different clock than the kubelet, as they are likely to run on different nodes. Following example comes from a CI run: ``` { "metadata": { "name": "testpod-68rc4", "generateName": "testpod-", "namespace": "sriov-conformance-testing", "creationTimestamp": "2024-04-08T10:44:45Z", ... "status": { ... "startTime": "2024-04-08T10:44:44Z", } ``` Signed-off-by: Andrea Panattoni --- test/conformance/tests/test_sriov_operator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/conformance/tests/test_sriov_operator.go b/test/conformance/tests/test_sriov_operator.go index 9ad400cbc..55711b78f 100644 --- a/test/conformance/tests/test_sriov_operator.go +++ b/test/conformance/tests/test_sriov_operator.go @@ -1015,7 +1015,7 @@ var _ = Describe("[sriov] operator", func() { testPod := createTestPod(node, []string{sriovNetworkName}) - recentMultusLogs := getMultusPodLogs(testPod.Spec.NodeName, testPod.ObjectMeta.CreationTimestamp.Time) + recentMultusLogs := getMultusPodLogs(testPod.Spec.NodeName, testPod.Status.StartTime.Time) Expect(recentMultusLogs).To( ContainElement(