Repository navigation
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A follow-up to #740, targeting its branch. It's one commit that removes the hardcoded per-workflow network values and every
sudofrom the ISO e2e jobs.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 fromtest/e2e_network.shkeep their fixed defaults (dne2e0,192.168.77.0/24). Debian and Ubuntu can run on one host at once, and nothing outlives the container.Changes compared with PR 740:
E2E_TAP_IFACE/E2E_HOST_IP/E2E_GUEST_IP/E2E_GUEST_MACvalues per workflow;/dev/kvmchmod step;pkill, and everysudo.dappnode-iso-<run_id>-<attempt>, unique per run instead of one name per workflow.docker run ubuntu:24.04, notsudo.test/e2e.Dockerfile: anubuntu:24.04image with QEMU, OVMF, sshpass, socat, dnsmasq and iptables.test/e2e_in_docker.sh:NET_ADMIN,/dev/net/tunand/dev/kvmwhen present;E2E_*variables through;test-outputback to the caller;test/e2e_network.sh: it skips theip_forwardsysctl when it is already on, because a container's/proc/sysis read-only.What the runner needs
Only Docker and
/dev/kvm, plus about 40 GB of disk. The runner must run directly on the host, not inside a container that talks to the host's Docker, because the workspace is mounted at its own path.Type of change
How Has This Been Tested?
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.E2E_*variables reached the test.test/e2e_in_docker.shexited with 143 and left no container behind.timezone:key on the schedule.Checklist