Skip to content

Linux datapath tests can accept terminating pods from a previous invocation #4864

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions