Repository navigation
Open
Labels
Description
User Story
As a contributor waiting on Branch E2E, I want the k3s conformance rows to spend less time on setup and teardown, so that they don't become the slowest jobs in the run as the conformance suite grows.
Description
The conformance/conformance rows on ubuntu-k3s (k3s, k3s-ha) take 10.5–13 min, against ~5 min for Docker and Podman. Most of the gap is in the tests (each sandbox start is ~8–10 s slower on k3s), but 2–5 min are fixed costs that can be cut without touching the tests. Measured in runs 43312288101, 43257220972 and 43237169662:
- No disk cache for k3s.
e2e-suites.ymlskips "Cache tmachine disks" forubuntu-k3s, with a comment that the reason is unknown (copied fromintegration-runner.yml, test(tmachine): add K3s conformance scenario #3848). The k3s setup layers are rebuilt in every job (~48 s). - Graceful power-off of the throwaway test VM. Teardown sends
system_powerdownand waits up to 120 s (power_off_or_kill); it took up to 34 s on k3s. The session overlay is deleted afterwards, so nothing needs a clean shutdown. - PostgreSQL waits on the HA row. The k3s-ha install waits ~22–27 s for PostgreSQL. Its image is pinned by digest, so it can be pre-pulled in a cached setup layer.
- 15-minute per-test limit. Rows run the prebuilt conformance program, which uses testkit's 900 s default. A stalled test (bug(e2e): file_transfer::upload_download_round_trip stalls on the k3s-ha conformance row #5520) runs for up to 15 min before failing. A 180 s limit fails it sooner; the slowest test today takes 38 s.
PR #5431 grows the suite from 22 to 35 tests, which takes the k3s rows to ~13–15 min, so these savings matter more soon.
Context
- Parent: test: retire the old e2e test system onto testkit #5281. Related: bug(e2e): file_transfer::upload_download_round_trip stalls on the k3s-ha conformance row #5520, test(e2e): surface where a conformance test stalls and keep logs that cover it #5333, ci(e2e): cut the VM install time of tmachine E2E suite rows #5438 (removing the reboot between install and tests is tracked there).
.github/workflows/e2e-suites.yml(disk cache condition)tests/tmachine/src/qemu/vm.rs,tests/tmachine/src/qemu/session.rs(teardown)tests/tmachine/ansible/playbooks/k3s*.yaml,openshell-k3s-ha.yaml,e2e/kubernetes/postgres-fixture.yamltests/runner/src/execute.rs(program arguments)
Definition of Done
- k3s rows restore and save the tmachine disk cache, and k3s boots correctly from a restored layer.
- The test session VM is stopped without a graceful power-off at teardown.
- The HA PostgreSQL image is pulled in a cached setup layer.
- The conformance program runs with a per-test timeout well below 900 s.
- Branch E2E passes, and the PR records before/after k3s row times.
Activity