ci: run KVM integration + external tests on GitHub-hosted runners#50
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The teardown-on-crash contract the plan specified contradicts Core's documented design: firecracker death cold-boots the daemon/controller pair on the same mutable rootfs (self-heal). Decision: self-heal is the contract. The test now proves recovery (exec answers again on the same dm volume) and that only the explicit stop reclaims the device.
config/runtime.exs set `config :hyper, Hyper.Cfg.Budget, ...` for every env, and app env is Cfg's highest-priority layer — so those "defaults" permanently shadowed the [budget] TOML table for every operator and for our own CI provisioning script's `[budget] cpu_max_load = 4.0`, which was inert. Move the values into Hyper.Cfg.Budget as real default-layer fallbacks passed through fetch_cfg, so the layering matches the module's own documented contract: config.exs > TOML > default. cpu_max_cap keeps its nilable optional_number path so an operator can still explicitly set `cpu_max_cap: nil` to disable the cap.
Boot validation (Hyper.Node.Layer.Repo.test_system/0) refuses with :layer_dir_not_found unless <work_dir>/layers exists — the node only creates it lazily on first image load. The install guide only had operators create /srv/hyper itself, which would pass ownership setup but fail the first boot.
The dm device NAME surviving a crash/recover cycle doesn't prove it's the SAME volume — a destroy+recreate under the same deterministic name would pass too, silently losing guest state. Write a marker through the guest and `sync` it (page cache dies with firecracker) before the SIGKILL, then read it back after recovery instead of just re-running /bin/true. The marker write doubles as the pre-crash liveness proof it replaces; the dm-name check stays as a supplementary assertion.
- Bump the integration job timeout 25 -> 35 min: worst case is two 10-minute E2E tests plus ~4 min of provisioning/compile/setup, which could hit 25 and get cancelled mid-run; cancelled steps then skip `!cancelled()` result uploads exactly when flake history matters. - provision-kvm-host.sh: give the suidhelper setuid-bit check a diagnostic on failure, matching the existing thin-pool check, instead of failing silently under `set -e`. - provision-kvm-host.sh: enumerate the deliberate CI-only deltas from install.md in the header comment so a future sync pass doesn't remove them.
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.
Summary
integrationCI job onubuntu-latest(x64 runners expose /dev/kvm): provisions the runner as a single-node Firecracker host (.github/scripts/provision-kvm-host.sh, mirrors docs/cookbook/install.md) and runs the gated suites with the real supervision tree (mix test --only integration --only external, no--no-start).Hyper.E2etest helpers (dm device observation, polling, exec retry).Test plan
mix checkgreen locally (E2E tags excluded by default)integrationjob green on this PR (the E2E's real verification)