Skip to content

xtask: Add vm-upgrade-test for version-matrix VM tests - #109

Draft
cgwalters-bot wants to merge 1 commit into
cgwalters-forge:mainfrom
cgwalters-bot:dispatch/implement/agent-run-42293721297
Draft

cgwalters-bot wants to merge 1 commit into
cgwalters-forge:mainfrom
cgwalters-bot:dispatch/implement/agent-run-42293721297

Conversation

@cgwalters-bot

Copy link
Copy Markdown
Collaborator

Executive summary

Add cargo xtask vm-upgrade-test. Each version-matrix VM check (install bootc at one revision, switch to another, boot it) becomes one command instead of hand partitioning, bcvk ephemeral and a local registry. It builds both git revisions onto a base image (default quay.io/fedora/fedora-bootc:44) and installs the first with bcvk libvirt run (bcvk to-disk) on the chosen filesystem and backend. Like the existing upgrade tests, it then switches to the second through the virtiofs-mounted host container storage, with bootc switch --transport containers-storage. Finally it reboots and checks the booted image. A btrfs row of bootc-dev/cgwalters-devspace-sandbox#36:

git fetch https://github.com/bootc-dev/bootc pull/2629/head
cargo xtask vm-upgrade-test --from v1.16.0 --to FETCH_HEAD --filesystem btrfs --composefs-backend --bootloader grub

More detail

Verification: the xtask unit tests and clippy pass. The image build ran to completion with the default base; dracut logged errors there, but stock fedora-bootc:44 logs the same ones in that sandbox. bcvk wasn't available, so I haven't run the VM steps or the btrfs matrix from #36. Those still need a run on a host with bcvk.

Not done: UKI boot (it needs a sealed image build), and a mode for ext4 without verity beyond --allow-missing-fsverity. --bootloader systemd needs a base image that has systemd-boot.

Review: two passes. The first found two blockers. The build-deps one is fixed. The other was to drive run-tmt and its readonly suite instead of a separate VM driver; I left that as a follow-up, since this command is meant to work without tmt. The second pass found no blockers.

Part of #108

Caller settings

Repository bootc-dev/cgwalters-devspace-sandbox, file AGENTS.md: add a short section along the lines of "For version-matrix VM tests (install bootc at one version, then upgrade or switch to another), use cargo xtask vm-upgrade-test --from <rev> --to <rev> --filesystem <fs> [--composefs-backend --bootloader grub] from a bootc checkout, one command per matrix row; don't hand-roll partitioning, bcvk ephemeral or a local registry."

Generated by dispatch · ◷

## Executive summary

Add `cargo xtask vm-upgrade-test`. Each version-matrix VM check (install bootc at one revision, switch to another, boot it) becomes one command instead of hand partitioning, `bcvk ephemeral` and a local registry. It builds both git revisions onto a base image (default `quay.io/fedora/fedora-bootc:44`) and installs the first with `bcvk libvirt run` (`bcvk to-disk`) on the chosen filesystem and backend. Like the existing upgrade tests, it then switches to the second through the virtiofs-mounted host container storage, with `bootc switch --transport containers-storage`. Finally it reboots and checks the booted image. A btrfs row of bootc-dev/cgwalters-devspace-sandbox#36:

    git fetch https://github.com/bootc-dev/bootc pull/2629/head
    cargo xtask vm-upgrade-test --from v1.16.0 --to FETCH_HEAD --filesystem btrfs --composefs-backend --bootloader grub

## More detail

Verification: the xtask unit tests and clippy pass. The image build ran to completion with the default base; dracut logged errors there, but stock `fedora-bootc:44` logs the same ones in that sandbox. bcvk wasn't available, so I haven't run the VM steps or the btrfs matrix from bootc-dev#36. Those still need a run on a host with bcvk.

Not done: UKI boot (it needs a sealed image build), and a mode for ext4 without verity beyond `--allow-missing-fsverity`. `--bootloader systemd` needs a base image that has systemd-boot.

Review: two passes. The first found two blockers. The build-deps one is fixed. The other was to drive `run-tmt` and its readonly suite instead of a separate VM driver; I left that as a follow-up, since this command is meant to work without tmt. The second pass found no blockers.

Part of bootc-dev#108

## Caller settings

Repository `bootc-dev/cgwalters-devspace-sandbox`, file `AGENTS.md`: add a short section along the lines of "For version-matrix VM tests (install bootc at one version, then upgrade or switch to another), use `cargo xtask vm-upgrade-test --from <rev> --to <rev> --filesystem <fs> [--composefs-backend --bootloader grub]` from a bootc checkout, one command per matrix row; don't hand-roll partitioning, `bcvk ephemeral` or a local registry."

Generated-by: https://github.com/cgwalters/#llms
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