Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/helm-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ permissions:
contents: read
jobs:
e2e-test:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
# go tool -n needs Go's disk cache to return a persistent executable path.
GOCACHEPROG: ""
VERSION: helm-e2e
E2E_ATENET_DATAPLANE: agentgateway
E2E_CREDENTIAL_PROVIDER: "1"
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/pr-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
run-tests:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
# A bound well clear of the observed runtime. Without one the platform
# default applies, and a wedged step burns a free-tier slot for six hours.
# default applies, and a wedged step occupies a runner for six hours.
timeout-minutes: 45
env:
# go tool -n needs Go's disk cache to return a persistent executable path.
GOCACHEPROG: ""
# Where each runner writes its JUnit. Every invocation needs its own file;
# a shared path means the last writer wins.
ARTIFACTS: ${{ github.workspace }}/_artifacts
Expand Down Expand Up @@ -139,14 +141,13 @@ jobs:
env:
BASE_REF: ${{ github.base_ref || github.event.merge_group.base_ref }}
run: hack/verify/postgresql-migrations.sh "origin/${BASE_REF#refs/heads/}"
# One kind cluster exercises BOTH runtimes. Free x86-64 ubuntu-latest runners
# expose /dev/kvm (with a udev rule), so create-kind-cluster.sh mounts it and the
# micro-VM (kata + cloud-hypervisor) sandbox class works alongside gVisor.
# One kind cluster exercises both gVisor and microVM runtimes.
# The runner must expose /dev/kvm for the microVM sandbox class.
# Each preview mode runs on a fresh cluster with agentgateway.
# The default install retains the required e2e-test check name.
e2e-test:
name: ${{ matrix.preview == 'off' && 'e2e-test' || 'e2e-test (preview)' }}
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
# Cluster bring-up, image builds and two sequential lanes; generous, but far
# short of the six-hour platform default a hung lane would otherwise consume.
timeout-minutes: 120
Expand All @@ -156,6 +157,8 @@ jobs:
dataplane: ['agentgateway']
preview: ['off', 'on']
env:
# go tool -n needs Go's disk cache to return a persistent executable path.
GOCACHEPROG: ""
E2E_ATENET_DATAPLANE: ${{ matrix.dataplane }}
# Apply the e2e test component (short atelet snapshot delays) across the
# initial install and the control plane redeploy in run-microvm-demo-kind.sh.
Expand Down
6 changes: 2 additions & 4 deletions internal/ateworker/actornet/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,8 @@ func SetupSandboxNetwork(ctx context.Context, cfg SandboxNetworkConfig) (_ *Sand
}, nil
}

// prepareNamespace pins sandboxSysctls and brings up lo. It must run before
// the namespace has any link but lo: a link copies conf/default when it is
// created, and a later write to conf/default does not reach links whose
// settings the node had set explicitly.
// prepareNamespace pins sandboxSysctls and brings up lo before sandbox links
// are created. Those links copy conf/default at creation time.
func prepareNamespace(context.Context) error {
if err := netns.SetSysctls(sandboxSysctls...); err != nil {
return err
Expand Down
11 changes: 7 additions & 4 deletions internal/ateworker/actornet/sandbox_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,16 @@ func TestSetupSandboxNetworkWithoutVeth(t *testing.T) {
t.Errorf("got a second namespace (%v vs %v); this shape needs one", n.GatewayNetNS, n.RuntimeNetNS)
}

// No veth was built, so nothing but lo is here until the tap arrives.
// Kernel tunnel modules can add dormant interfaces to a new namespace.
// No veth was built, and only lo should be up until the tap arrives.
if err := netns.Do(ctx, n.RuntimeNetNS, func(context.Context) error {
links, err := netlink.LinkList()
if err != nil {
return err
}
for _, l := range links {
if l.Attrs().Name != "lo" {
_, isVeth := l.(*netlink.Veth)
if isVeth || (l.Attrs().Name != "lo" && l.Attrs().Flags&net.FlagUp != 0) {
t.Errorf("unexpected interface %q in the actor namespace", l.Attrs().Name)
}
}
Expand Down Expand Up @@ -552,8 +554,9 @@ func TestSandboxNamespacesDoNotInheritNodeSettings(t *testing.T) {
}
for _, l := range links {
name := l.Attrs().Name
// lo predates the sysctls.
if l.Attrs().Flags&net.FlagLoopback != 0 {
// Loopback and kernel tunnel devices predate the sysctls.
// Check the veths added during and after setup.
if _, ok := l.(*netlink.Veth); !ok {
continue
}
for key, value := range perLink {
Expand Down
Loading