Skip to content

ci(e2e): run conformance and policy DNS IPv6 tests on an IPv6-only k3s cluster - #5724

Merged
FrostGod merged 20 commits into
mainfrom
test/5698-k3s-ipv6-environment/matthewgrossman
Nov 26, 2026
Merged

FrostGod merged 20 commits into
mainfrom
test/5698-k3s-ipv6-environment/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Add a tmachine environment, ubuntu-k3s-ipv6, with an IPv6-only K3s cluster. CI runs two suites on it with the k3s-ha installer: conformance, and a new features/policy-dns-ipv6 suite that checks sandbox egress through policy DNS AAAA answers.

Related Issue

Closes #5698
Refs #3716

Changes

Environment

  • QEMU user networking gives guests fd00:10::/64 instead of its default fec0::/64. Linux ranks the site-local fec0:: below other addresses, so the node sent traffic to IPv6 Services from flannel's address and never got the reply.
  • New ipv6 feature environment on the ubuntu-k3s base (k3s-ipv6.yaml). Pods and Services get only IPv6 addresses, and the node registers its IPv6 address. The VM keeps IPv4 for image pulls and the Agent Sandbox install.
  • When the node's address is IPv6, the k3s installer sets the gateway and supervisor listenAddress to :: and server.hostGatewayIP to the node's IPv6 address.
  • The installers accept an IPv6 gateway ClusterIP and bracket it in the client endpoint.
  • ubuntu-k3s is unchanged: its node's address is IPv4.

Tests

  • The test host servers (tests/support/host-server) listen on a dual-stack IPv6 socket, falling back to IPv4 where the host has no IPv6.
  • New policy-dns-ipv6 feature suite. It leaves policy_dns_ipv6_egress at its default, auto, which turns on because sandboxes have no IPv4 route. A native client in the sandbox, with proxy variables unset:
    • gets the same synthetic AAAA answer over UDP and TCP, different from the host's real address;
    • reaches the policy endpoint's server through the synthetic address;
    • is denied on the server's real address and on the synthetic address at another port.
  • ubuntu-k3s-ipv6/k3s-ha joins the two existing test(conformance): run the two sandbox-log tests on k3s-ha again #5752 skips in tests/suites/unsupported.yaml.

Not covered: reaching IPv4-only hosts through DNS64/NAT64, and the shared supervisor pool. The pool's tests are still in e2e/rust (#5297).

Testing

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

QEMU user networking defaults to the site-local fec0::/64, which Linux ranks below any global address. On a dual-stack K3s guest the node then sends to IPv6 Services from flannel's address and never gets the reply.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…lues in the k3s installers

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 18, 2026
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test 9073847

@matthewgrossman matthewgrossman added the test:e2e Requires end-to-end coverage label Nov 18, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for 9073847. Open Branch E2E Checks, find the run for commit 9073847, and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

…eway address

Create an empty environment Helm values file when the environment has none, so the Helm command is a plain list. Name the gateway IP and port before bracketing an IPv6 address.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman

Copy link
Copy Markdown
Member Author

/ok to test e30f2e2

The IPv6 setup now only writes the K3s configuration, so the cluster is created on its first start and needs no reset, and k3s.yaml is unchanged. The k3s installer sets the gateway and supervisor listen addresses to :: when the node's first address is IPv6, instead of reading Helm values the environment wrote.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman
matthewgrossman marked this pull request as ready for review November 19, 2026 18:43
@FrostGod

Copy link
Copy Markdown
Contributor

What it doesn't cover yet
1 - IPv6-only clusters: it only tests dual-stack with IPv6 first, so the IPv4 fallback could hide bugs.

2 - Shared supervisor pool: the tests keep the default dedicated supervisors. That means the supervisor :: setting has no effect, and pool failover isn't tested.

3 - Sandbox egress over IPv6: the test servers and hostGatewayIP are IPv4 only, so the IPv6-literal egress fix, minor upto you, can leave it as it is

4 - Hostname egress to IPv6-only Services: not tested; that's the known DNS gap in #3716.

@matthewgrossman
matthewgrossman requested a review from a team as a code owner November 20, 2026 16:23
…vironment/matthewgrossman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman
matthewgrossman force-pushed the test/5698-k3s-ipv6-environment/matthewgrossman branch from 90a3322 to af09e54 Compare November 20, 2026 16:28
@FrostGod

Copy link
Copy Markdown
Contributor

Could this PR also cover #3716's remaining ask? #5793 adds policy DNS IPv6 egress, and #3716 needs an automated sandbox boundary test for it on an IPv6-only network:

  • a native client in the sandbox, with proxy variables unset
  • AAAA queries over UDP and TCP return a synthetic answer
  • connecting to the synthetic address reaches the pinned upstream
  • connections are denied to the real IP, on a wrong port, and through a stale mapping

This needs an IPv6-only k3s environment, or a row that sets policy_dns_ipv6_egress: enabled for the Kubernetes driver (auto stays off on dual-stack). The existing e2e/rust/tests/policy_dns_ipv6_egress.rs from #5793 covers part of this and could be the starting point. With that in place, this PR can close #3716.

…vironment/matthewgrossman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

# Conflicts:
#	.github/workflows/e2e-suites.yml
…ironment

The IPv6 k3s-ha row has the same multi-replica log gap (#5752) as ubuntu-k3s/k3s-ha.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Set host.openshell.internal to the node's first address and enable policy DNS IPv6 egress when it is IPv6.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ment

Refs #3716

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@FrostGod

FrostGod commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

@matthewgrossman thanks, the policy-dns-ipv6 suite covers what #3716 needs. Could you rebase to resolve the host-server conflicts with #5780, and update the description to mention the new suite and add Closes #3716?

FrostGod
FrostGod previously approved these changes Nov 25, 2026

@FrostGod FrostGod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…vironment/matthewgrossman

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>

# Conflicts:
#	tests/support/host-server/src/http.rs
#	tests/support/host-server/src/lib.rs
…ly without IPv6

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
FrostGod
FrostGod previously approved these changes Nov 25, 2026

@FrostGod FrostGod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FrostGod
FrostGod enabled auto-merge November 25, 2026 20:04
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman matthewgrossman changed the title ci(e2e): run conformance on an IPv6-first k3s cluster ci(e2e): run conformance and policy DNS IPv6 tests on an IPv6-only k3s cluster Nov 25, 2026
@matthewgrossman

Copy link
Copy Markdown
Member Author

@FrostGod thanks, updated:

  1. IPv6-only: ubuntu-k3s-ipv6 is now an IPv6-only cluster. Pods and Services have only IPv6 addresses; the VM keeps IPv4 for image pulls. Locally, conformance passes apart from the two test(conformance): run the two sandbox-log tests on k3s-ha again #5752 skips, and policy-dns-ipv6 passes. CI is running on the new head.
  2. Shared supervisor pool: not in this PR. Those tests are still in e2e/rust, and nothing in tmachine turns the pool on yet, so it's a follow-up with the test(e2e): decide which e2e/rust tests to port and in what order #5297 port.
  3. IPv6 egress: the test host servers listen on IPv6 and hostGatewayIP is the node's IPv6 address. policy-dns-ipv6 checks requests reach the host over IPv6. An IPv6 literal in a policy endpoint isn't tested.
  4. Hostname egress / feat(network): support policy DNS IPv6 egress across the sandbox–supervisor boundary #3716: the new policy-dns-ipv6 suite leaves policy_dns_ipv6_egress at auto, which turns on because sandboxes have no IPv4 route. With proxy variables unset, the AAAA answer over UDP and TCP is the same synthetic address. It reaches the pinned upstream. The real IP and a wrong port are denied. Not covered: DNS64/NAT64 to IPv4-only hosts, and the stale-mapping case, so this PR refers to feat(network): support policy DNS IPv6 egress across the sandbox–supervisor boundary #3716 rather than closing it.

@FrostGod FrostGod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FrostGod
FrostGod added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit df18dc4 Nov 26, 2026
162 of 163 checks passed
@FrostGod
FrostGod deleted the test/5698-k3s-ipv6-environment/matthewgrossman branch November 26, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(e2e): run the Kubernetes e2e tests on an IPv6 kind cluster

2 participants