Skip to content

workflows/e2e: Cover IPv6-only #38235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 18, 2025
Merged

workflows/e2e: Cover IPv6-only #38235

merged 6 commits into from
Mar 18, 2025

Conversation

pchaigno
Copy link
Member

@pchaigno pchaigno commented Mar 17, 2025

This pull request adds coverage for an IPv6-only configuration in our end-to-end upgrade workflow. IPv6-only is already covered in the IPv6 Smoke Test, but with a different configuration (ex., KPR is enabled) and a lot fewer tests executed.

The first commit adds the new test case. The second and third skip some connectivity tests for which we don't have IPv-only support yet. The last three commits fix issues in the connectivity tests.

This commit adds coverage for an IPv6-only configuration in the Upgrade
E2E workflow.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Our GitHub action VMs don't have IPv6 access to Internet, so IPv6-only
clusters can't connect to the outside world and we must skip
connectivity tests to various such targets.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Our tcpdump-based encryption tests depend on the udp[] syntax of
tcpdump. Those tests are executed even when IPsec is disabled to check
that the detection works. Unfortunately, as per the manpage [1], udp[]
doesn't support IPv6:

    Arithmetic expression against transport layer headers, like tcp[0],
    does not work against IPv6 packets. It only looks at IPv4 packets.

Running a quick test confirms it:

    $ sudo tcpdump -i any "ip6 and udp[42:4] == 0x00000000"
    tcpdump: data link type LINUX_SLL2
    tcpdump: expression rejects all packets

This commit therefore skips that test in case of IPv6-only clusters.

1 - https://linux.die.net/man/8/tcpdump
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
This commit moves the logic to get the MTU into its own deriveMTU
function, to simplify subsequent changes.

There are no functional changes in this commit.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
This commit adds support for IPv6-only clusters in the fragmentation
test. Specifically, we would fail to retrieve the proper MTU in
IPv6-only clusters simply because we'd run ip route, which doesn't
output anything, instead of ip -6 route.

Fixes: ef98fb6 ("connectivity: Add pod-to-pod-no-frag")
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
The connectivity tests may sometimes fail with the following panic:

    panic: runtime error: index out of range [1] with length 0

    goroutine 18285 [running]:
    github.com/cilium/cilium/cilium-cli/connectivity/tests.(*podToPodMissingIPCache).Run(0xc0012867b0, {0x622cc78, 0xc000b3c380}, 0xc001ce3a20)
        /go/src/github.com/cilium/cilium/cilium-cli/connectivity/tests/pod.go:318 +0x119f
    github.com/cilium/cilium/cilium-cli/connectivity/check.(*Test).Run(0xc001ce3a20, {0x622cc78, 0xc000b3c380}, 0x14)
        /go/src/github.com/cilium/cilium/cilium-cli/connectivity/check/test.go:376 +0x664
    github.com/cilium/cilium/cilium-cli/connectivity/check.(*ConnectivityTest).Run.func1()
        /go/src/github.com/cilium/cilium/cilium-cli/connectivity/check/context.go:419 +0x99
    created by github.com/cilium/cilium/cilium-cli/connectivity/check.(*ConnectivityTest).Run in goroutine 2070
        /go/src/github.com/cilium/cilium/cilium-cli/connectivity/check/context.go:413 +0x91

This commit fixes it by checking that the regexp matched before
dereferencing its matches.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
@pchaigno pchaigno added release-note/ci This PR makes changes to the CI. feature/ipv6-only Relates to single-stack IPv6 support. labels Mar 17, 2025
@github-actions github-actions bot added the cilium-cli This PR contains changes related with cilium-cli label Mar 17, 2025
@pchaigno pchaigno marked this pull request as ready for review March 17, 2025 12:50
@pchaigno pchaigno requested review from a team as code owners March 17, 2025 12:50
@pchaigno pchaigno requested review from youngnick and Artyop March 17, 2025 12:50
@pchaigno pchaigno changed the title workflows: Cover IPv6-only workflows/e2e: Cover IPv6-only Mar 17, 2025
@pchaigno pchaigno enabled auto-merge March 18, 2025 08:48
@pchaigno pchaigno added this pull request to the merge queue Mar 18, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 18, 2025
Merged via the queue into main with commit 35d8d2f Mar 18, 2025
353 of 386 checks passed
@pchaigno pchaigno deleted the pr/pchaigno/cover-ipv6-only branch March 18, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cilium-cli This PR contains changes related with cilium-cli feature/ipv6-only Relates to single-stack IPv6 support. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants