Skip to content

Run the ISO end-to-end tests in their own container on the archive-1 runners - #741

Closed
3alpha wants to merge 5 commits into
masterfrom
iso-e2e-in-docker
Closed

3alpha wants to merge 5 commits into
masterfrom
iso-e2e-in-docker

Conversation

@3alpha

@3alpha 3alpha commented Nov 19, 2026

Copy link
Copy Markdown
Member

Description

This builds on #740 and includes its commits. It moves the Debian and Ubuntu unattended ISO tests to the archive-1 org runners, but without hardcoded interfaces, subnets or MACs per workflow, and without sudo on the runner.

The guest network, QEMU and the test now run inside a throwaway Docker container per job, through the new test/e2e_in_docker.sh. The container is its own network namespace, so the TAP interface, NAT rules and dnsmasq from test/e2e_network.sh keep their fixed defaults (dne2e0, 192.168.77.0/24). They never clash with a parallel job on the same host, and they disappear with the container. Pull requests from forks still run on ubuntu-latest, through the same container path.

What changes compared with PR 740:

  • Removed:
    • the per-workflow E2E_TAP_IFACE / E2E_HOST_IP / E2E_GUEST_IP / E2E_GUEST_MAC values;
    • the apt install and /dev/kvm chmod step;
    • the network up/down steps, the leftover-dnsmasq pkill, and every sudo.
  • Compose project name: dappnode-iso-<run_id>-<attempt>, unique per run instead of one name per workflow.
  • Root-owned files: the ISO build's files are reclaimed before checkout and removed afterwards through docker run ubuntu:24.04, not sudo.
  • test/e2e.Dockerfile: an ubuntu:24.04 image with QEMU, OVMF, sshpass, socat, dnsmasq and iptables.
  • test/e2e_in_docker.sh:
    • runs the container with NET_ADMIN, /dev/net/tun and /dev/kvm when present;
    • mounts the repo at its own path and passes E2E_* variables through;
    • keeps VM disks in an anonymous volume and gives test-output back to the caller;
    • removes the container and its volume when the job is cancelled, with an 85-minute time limit as a backstop;
    • falls back to iptables-legacy when the host lacks nftables NAT support.
  • test/e2e_network.sh: it skips the ip_forward sysctl when it is already on, because a container's /proc/sys is read-only.

What the runner needs

  • Docker, with the runner running directly on the host, not inside a container that talks to the host's Docker: the workspace is mounted at its own path.
  • /dev/kvm. Without it the install falls back to TCG emulation and runs past the 90-minute timeout.
  • About 40 GB free disk.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Other: tested locally on an arm64 Docker host, without KVM.
    • Two containers ran in parallel, both using dne2e0 / 192.168.77.10. A veth stood in for the QEMU guest. Each guest got DNS from dnsmasq, the local ping reply and HTTPS through NAT, and the host saw none of it.
    • QEMU attached to the TAP inside the container, and E2E_* variables reached the test.
    • Sending SIGTERM to test/e2e_in_docker.sh exited with 143 and left no container behind.
    • shellcheck 0.10.0 is clean on both scripts. actionlint 1.7.7 reports only the existing timezone: key on the schedule.
  • ISO install: this PR's own e2e runs on archive-1 are the first full installs with KVM.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

Marketen and others added 5 commits November 19, 2026 17:50
The Debian and Ubuntu unattended ISO tests run on the runner named by the
ISO_E2E_RUNNER repository variable, or on ubuntu-latest while it is unset.
Pull requests from forks always stay on ubuntu-latest.

A self-hosted host is reused between runs, so each job now:
- uses its own TAP interface, subnet and MAC, so both can run on one host;
- clears a leftover guest network before creating its own, and removes it
  and the build output afterwards;
- takes back root-owned files a cancelled run left in the workspace.

Removing the network also stops a dnsmasq whose pid file was lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each ISO job gets its own Compose project, so the Debian and Ubuntu jobs
cannot share or remove each other's installer container on one Docker host,
and removes its installer container, network and image when it finishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guest network, QEMU and the test now run inside one Docker container per
job, through test/e2e_in_docker.sh. The container is its own network
namespace, so the TAP interface, NAT rules and dnsmasq keep fixed names and
addresses, never clash with a parallel job on the same host, and go away with
the container. The runner needs only Docker and /dev/kvm: no sudo, no apt, and
no per-workflow interfaces, subnets or MACs.
@3alpha
3alpha requested a review from a team as a code owner November 19, 2026 18:34
@3alpha 3alpha closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants