Skip to content

flatcar: validate sysext on a running VM#1080

Open
kartikjoshi21 wants to merge 1 commit into
project-dalec:mainfrom
kartikjoshi21:kartikjoshi21/flatcar-runtime-validation
Open

flatcar: validate sysext on a running VM#1080
kartikjoshi21 wants to merge 1 commit into
project-dalec:mainfrom
kartikjoshi21:kartikjoshi21/flatcar-runtime-validation

Conversation

@kartikjoshi21

@kartikjoshi21 kartikjoshi21 commented Jun 4, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Adds a Flatcar runtime validation workflow that:

  • builds a sysext with the current flatcar/testing/sysext target
  • boots the pinned Flatcar Stable 4593.2.1 QEMU image
  • provisions the generated .raw image under /etc/extensions
  • restarts systemd-sysext and verifies the extension binary executes

The official Flatcar QEMU image and wrapper script are SHA-512 pinned. The test uses KVM when available and falls back to QEMU software emulation.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Refs #969

Special notes for your reviewer:

This complements artifact-level integration coverage by validating the output on a running Flatcar VM. It does not add a Flatcar-native package toolchain.

Validation:

  • go run ./cmd/lint ./...
  • make test
  • make check-generated
  • actionlint .github/workflows/flatcar-runtime.yml
  • flatcar-runtime GitHub Actions job passed: Flatcar listed the extension in systemd-sysext status and executed its binary successfully

Copilot AI review requested due to automatic review settings June 4, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an end-to-end CI validation that a Dalec-built systemd-sysext can be fetched and activated inside a Flatcar VM under QEMU.

Changes:

  • Add a Bash harness to build a sysext, boot Flatcar under QEMU, fetch the sysext via Ignition, and assert it runs as expected.
  • Add a Dalec fixture spec used to build the test sysext and validate its stdout.
  • Add a GitHub Actions workflow to run the runtime validation on PRs/pushes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
test/flatcar-runtime.sh Builds the sysext, provisions a Flatcar VM, serves the sysext over HTTP, and validates activation/execution via SSH.
test/fixtures/flatcar-runtime.yml Defines the sysext fixture contents and a basic runtime assertion for the emitted binary output.
.github/workflows/flatcar-runtime.yml CI workflow to set up Docker/QEMU, cache Flatcar artifacts, and execute the runtime test script.

Comment thread test/flatcar-runtime.sh Outdated
Comment on lines +196 to +198
sudo systemd-sysext status --no-pager | grep -F '${SYSEXT_NAME}'
test -x /usr/bin/${SYSEXT_NAME}
test \"\$(/usr/bin/${SYSEXT_NAME})\" = '${EXPECTED_OUTPUT}'
Comment thread test/flatcar-runtime.sh Outdated
Comment on lines +160 to +163
python3 -m http.server \
--bind 0.0.0.0 \
--directory "${OUTPUT_DIR}" \
"${HTTP_PORT}" > "${WORK_DIR}/http.log" 2>&1 &
Comment thread .github/workflows/flatcar-runtime.yml Outdated
Comment on lines +76 to +77
- name: Validate sysext on Flatcar
run: test/flatcar-runtime.sh
Comment thread test/flatcar-runtime.sh Outdated
Comment on lines +16 to +17
readonly HTTP_PORT="${FLATCAR_HTTP_PORT:-8000}"
readonly SSH_PORT="${FLATCAR_SSH_PORT:-2222}"
Comment thread .github/workflows/flatcar-runtime.yml Outdated
Comment on lines +54 to +55
sudo apt update
sudo apt install -y moby-engine=29.4.* moby-buildx=0.33.* moby-cli=29.4.* moby-containerd=2.3.*

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going toa dd this level of testing, I think it should be in the integration suite.
We should also be able to do this with buildkit, though it will need a buildkitd that allows for higher privileged containers.

@kartikjoshi21 kartikjoshi21 force-pushed the kartikjoshi21/flatcar-runtime-validation branch from aabbe6d to dcfd282 Compare June 9, 2026 10:09
@kartikjoshi21

Copy link
Copy Markdown
Member Author

If we are going toa dd this level of testing, I think it should be in the integration suite. We should also be able to do this with buildkit, though it will need a buildkitd that allows for higher privileged containers.

Yeah, that makes sense. i was thinking of keeping it separate to keep the flow totally untouched. But reworked to use the same integration suite.

@kartikjoshi21 kartikjoshi21 force-pushed the kartikjoshi21/flatcar-runtime-validation branch from dcfd282 to 555c32e Compare June 9, 2026 10:38
@kartikjoshi21 kartikjoshi21 requested a review from cpuguy83 June 9, 2026 10:43
Signed-off-by: Kartik Joshi <karikjoshi21@gmail.com>
@kartikjoshi21 kartikjoshi21 force-pushed the kartikjoshi21/flatcar-runtime-validation branch from 555c32e to 722c832 Compare June 26, 2026 11:13
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.

3 participants