Skip to content

Commit 0db5af4

Browse files
Merge pull request #27270 from pacevedom/sandboxerror
Bug 2100091: Ignore FailedCreatePodSandBox events for garbage collector tests
2 parents aaf9f1c + 477db2a commit 0db5af4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/synthetictests/networking.go

+12
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ func testPodSandboxCreation(events monitorapi.Intervals, clientConfig *rest.Conf
6868
if !strings.Contains(event.Message, "reason/FailedCreatePodSandBox Failed to create pod sandbox") {
6969
continue
7070
}
71+
if strings.Contains(event.Locator, "pod/simpletest-rc-to-be-deleted") &&
72+
(strings.Contains(event.Message, "not found") ||
73+
strings.Contains(event.Message, "pod was already deleted") ||
74+
strings.Contains(event.Message, "error adding container to network")) {
75+
// This FailedCreatePodSandBox might happen because of an upstream Garbage Collector test. This test creates at least 10 pods controlled
76+
// by a ReplicationController. Then proceeds to create a second ReplicationController and sets half of the pods owned by both RCs. Tries
77+
// deleting all pods owned by the first RC and checks if the half having 2 owners is not deleted. Test doesnt wait for
78+
// readiness/availability, and it deletes pods with a 0 second termination period. If CNI is not able to create the sandbox in time it
79+
// does not signal an error in the test, as we don't need the pod being available for success.
80+
// https://github.com/kubernetes/kubernetes/blob/70ca1dbb81d8b8c6a2ac88d62480008780d4db79/test/e2e/apimachinery/garbage_collector.go#L735
81+
continue
82+
}
7183
if strings.Contains(event.Message, "Multus") &&
7284
strings.Contains(event.Message, "error getting pod") &&
7385
(strings.Contains(event.Message, "connection refused") || strings.Contains(event.Message, "i/o timeout")) {

0 commit comments

Comments
 (0)