Skip to content

feat(artifacts): create an AL2023 CI rootfs#5772

Draft
JamesC1305 wants to merge 4 commits intofirecracker-microvm:mainfrom
JamesC1305:create-al2023-rootfs
Draft

feat(artifacts): create an AL2023 CI rootfs#5772
JamesC1305 wants to merge 4 commits intofirecracker-microvm:mainfrom
JamesC1305:create-al2023-rootfs

Conversation

@JamesC1305
Copy link
Copy Markdown
Contributor

Implement a new build process for an Amazon Linux 2023 CI rootfs and integrate it into our test framework.

To discuss: how do we want to handle running tests on Ubuntu vs. AL2023? If we run tests on both our test count doubles (~1000 -> ~2000 cases). Right now, I've created a new fixture rootfs_any (uses both) that is used only in uvm_plain_any. Any tests relying on rootfs or rootfs_rw remain on Ubuntu for now.

TODO: update tests/README.md to contain info about AL2023 rootfs.

Changes

  • Moved CI rootfs build related files from resources to resources/rootfs
  • Define a new file setup-al2023-ci.sh that performs all required setup for new rootfs
  • Implement new GuestDistro class containing distro-specific paths (to fix tests relying on hardcoded ubuntu values)
  • Create new test fixtures for AL2023 rootfs.

Reason

We will need an AL2023 rootfs for future testing purposes.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.02%. Comparing base (dc84e40) to head (b5c2467).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5772   +/-   ##
=======================================
  Coverage   83.02%   83.02%           
=======================================
  Files         276      276           
  Lines       29340    29340           
=======================================
  Hits        24359    24359           
  Misses       4981     4981           
Flag Coverage Δ
5.10-m5n.metal 83.30% <ø> (ø)
5.10-m6a.metal 82.62% <ø> (ø)
5.10-m6g.metal 80.02% <ø> (ø)
5.10-m6i.metal 83.30% <ø> (ø)
5.10-m7a.metal-48xl 82.62% <ø> (-0.01%) ⬇️
5.10-m7g.metal 80.02% <ø> (+<0.01%) ⬆️
5.10-m7i.metal-24xl 83.27% <ø> (-0.01%) ⬇️
5.10-m7i.metal-48xl 83.27% <ø> (ø)
5.10-m8g.metal-24xl 80.02% <ø> (ø)
5.10-m8g.metal-48xl 80.02% <ø> (ø)
5.10-m8i.metal-48xl 83.27% <ø> (-0.01%) ⬇️
5.10-m8i.metal-96xl 83.27% <ø> (ø)
6.1-m5n.metal 83.33% <ø> (+<0.01%) ⬆️
6.1-m6a.metal 82.66% <ø> (+<0.01%) ⬆️
6.1-m6g.metal 80.02% <ø> (ø)
6.1-m6i.metal 83.32% <ø> (ø)
6.1-m7a.metal-48xl 82.64% <ø> (ø)
6.1-m7g.metal 80.02% <ø> (+<0.01%) ⬆️
6.1-m7i.metal-24xl 83.34% <ø> (+<0.01%) ⬆️
6.1-m7i.metal-48xl 83.34% <ø> (-0.01%) ⬇️
6.1-m8g.metal-24xl 80.02% <ø> (ø)
6.1-m8g.metal-48xl 80.02% <ø> (ø)
6.1-m8i.metal-48xl 83.34% <ø> (-0.01%) ⬇️
6.1-m8i.metal-96xl 83.34% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JamesC1305
Copy link
Copy Markdown
Contributor Author

TODO: we agreed that our medium-term solution will be to run AL2023 with 6.1 kernels and maintain ubuntu for 5.10. Once 5.10 gets deprecated (#5701), we will switch to use AL2023 only.I need to modify this PR accordingly.

@JamesC1305 JamesC1305 force-pushed the create-al2023-rootfs branch from 47c5999 to 3290135 Compare March 20, 2026 17:02
@JamesC1305
Copy link
Copy Markdown
Contributor Author

Updated code to run 5.10 on ubuntu. The default otherwise should be 6.1. Running this in a pipeline daily now with the new artifacts.

Create a new subdirectory `rootfs` under `resources` and move `overlay`
and ubuntu CI rootfs setup script underneath. This should help prevent
the `resources` base directory from becoming too cluttered.

Also rename previous `chroot.sh` to `setup-ubuntu-ci.sh`, to more
accurately reflect its purpose (which is to be executed inside the
ubuntu image and perform the setup needed).

These should help make the structure cleaner when a new setup script
is added for an AL2023 rootfs.

Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
Define the build instructions for an Amazon Linux 2023 rootfs to be used
in CI. A new 'customisation' script is defined with all commands to be
run inside the image. The goal is ensure all our tests pass correctly
with the new rootfs.

Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
Add a new member of the Microvm class, GuestDisrto, which contains
distro-specific information. The currently included fields are
hostname (set in rootfs build), ssh_service (Ubuntu uses ssh.service vs
AL2023's sshd.service), os_release_token (displayed as part of
/etc/os-release), and shell_prompt.

These fields are used a few different tests. The GuestDistro class makes
it easier to extend if new fields are required.

Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
Now that we have an additional CI rootfs (amazon linux), our fixtures
must be modified accordingly. For now, the default is Amazon linux, and
new a new rootfs_any fixture has been created to be used by
uvm_plain_any.

TBD: running tests on both rootfs (via `uvm_plain_any`) adds 582
additional test cases. Do we really need this?

Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
@JamesC1305 JamesC1305 force-pushed the create-al2023-rootfs branch from d272bae to b5c2467 Compare March 24, 2026 13:46
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.

1 participant