Summary
Consecutive IPv6 and IPv4 datapath tests reuse Goldpinger labels. Asynchronous cleanup can leave terminating pods that satisfy the next invocation's readiness check, followed by an intermittent Less than 2 pods on node failure.
Steps to reproduce
Using the pre-fix code on a dual-stack cluster with at least two Linux nodes in nodepool1, run:
go test -count=1 -timeout 3m -tags=connection,integration -run '^TestDatapathLinux$' ./test/integration/datapath -isDualStack=true
go test -count=1 -timeout 3m -tags=connection,integration -run '^TestDatapathLinux$' ./test/integration/datapath
Keep the same namespace and pod-name settings. The failure depends on old pods still being visible when the next invocation starts; it does not occur every time.
Expected behavior
Cleanup waits for the previous invocation's pods to disappear before returning.
Relevant code
Pre-fix cleanup and pod helpers.
Proposed fix
#4863 adds WaitForPodsDelete after the existing controller deletions, using both workload selectors and t.Error on failure. Both selectors cover custom -podName settings.
Readiness checks, RBAC cleanup, and timeouts are unchanged.
Summary
Consecutive IPv6 and IPv4 datapath tests reuse Goldpinger labels. Asynchronous cleanup can leave terminating pods that satisfy the next invocation's readiness check, followed by an intermittent
Less than 2 pods on nodefailure.Steps to reproduce
Using the pre-fix code on a dual-stack cluster with at least two Linux nodes in
nodepool1, run:Keep the same namespace and pod-name settings. The failure depends on old pods still being visible when the next invocation starts; it does not occur every time.
Expected behavior
Cleanup waits for the previous invocation's pods to disappear before returning.
Relevant code
Pre-fix cleanup and pod helpers.
Proposed fix
#4863 adds
WaitForPodsDeleteafter the existing controller deletions, using both workload selectors andt.Erroron failure. Both selectors cover custom-podNamesettings.Readiness checks, RBAC cleanup, and timeouts are unchanged.