Skip to content

Run the ISO end-to-end tests on the archive-1 runners - #740

Merged
Marketen merged 7 commits into
masterfrom
marc/iso-e2e-self-hosted
Nov 23, 2026
Merged

Marketen merged 7 commits into
masterfrom
marc/iso-e2e-self-hosted

Conversation

@Marketen

@Marketen Marketen commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

The Debian and Ubuntu unattended ISO tests now run on our archive-1 org runners (archive-org-2, archive-org-3) instead of ubuntu-latest. This works towards the decision of 14 October to move the installer repo's Actions minutes off GitHub. Pull requests from forks stay on ubuntu-latest.

Why more than a runs-on change

A GitHub-hosted runner is thrown away after each job; ours are not, and both of them run on the same host. Each test creates a TAP interface, iptables NAT rules and a dnsmasq, and the ISO build leaves root-owned files in the workspace. So:

  • The guest network, QEMU and the test run in a throwaway container per job, through test/e2e_in_docker.sh and the image in test/e2e.Dockerfile. The container is its own network namespace, so every job keeps the fixed dne2e0 / 192.168.77.0/24, and parallel jobs on one host never clash. The TAP interface, NAT rules and dnsmasq go away with the container.
  • Each run builds the ISO in its own Compose project, dappnode-iso-<run_id>-<attempt>. When it finishes, it removes its installer container, network and image.
  • Root-owned files in the workspace are reclaimed before checkout and removed afterwards, through docker run rather than sudo.
  • A cancelled job's test container is removed by the cleanup step. The container carries a label for its run, and test/e2e_in_docker.sh --remove deletes it in case the job was killed before the script could.

test/e2e_network.sh skips the ip_forward sysctl when it is already on, because a container's /proc/sys is read-only. Its down also stops a dnsmasq whose pid file was lost.

What the runner needs

  • Docker with compose, running on the host itself. The workspace is mounted into containers at its own path, so a runner inside a container that uses the host's Docker does not work.
  • /dev/kvm. Without it the install falls back to TCG emulation and runs past the 90-minute timeout. The job warns when KVM is missing.
  • About 40 GB free disk: the guest disk is a 32 GB qcow2, plus the ISO and Docker layers.

The runner needs no sudo and no packages besides Docker, though access to Docker is root-equivalent on the host.

How it was tested

  • With the container setup, the Debian and Ubuntu installs ran at the same time on archive-1, both on dne2e0, both with KVM, and both passed.
  • The cancel path, locally: killing the wrapper's whole process group left its container running, and test/e2e_in_docker.sh --remove then deleted it.
  • actionlint 1.7.7: no new findings. It only reports the existing timezone: key on the schedule, which is already on master and works.
  • shellcheck 0.10.0 on test/e2e_in_docker.sh and test/e2e_network.sh: clean.
  • Not yet run: the container setup on ubuntu-latest, which only fork pull requests use.

🤖 Generated with Claude Code

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>
@Marketen
Marketen requested a review from a team as a code owner November 19, 2026 16:51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Marketen Marketen changed the title Let the ISO end-to-end tests run on a self-hosted runner Run the ISO end-to-end tests on the ipfs-dev-gateway runners Nov 19, 2026
Marketen and others added 2 commits November 19, 2026 18:00
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>
@Marketen Marketen changed the title Run the ISO end-to-end tests on the ipfs-dev-gateway runners Run the ISO end-to-end tests on the archive-1 runners Nov 19, 2026
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.
Marketen and others added 2 commits November 23, 2026 11:05
A cancelled job can be killed before test/e2e_in_docker.sh runs its own
trap, which leaves the test container holding KVM for up to 85 minutes.
The container now carries a label for its run, and the always() cleanup
step removes it with test/e2e_in_docker.sh --remove.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the ISO end-to-end tests in their own container
@Marketen
Marketen merged commit 4fb2049 into master Nov 23, 2026
14 checks passed
@Marketen
Marketen deleted the marc/iso-e2e-self-hosted branch November 23, 2026 14:15
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