Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new ephemeral test-basic subcommand to the bcvk tool, which serves as a smoke test by booting an ephemeral VM and verifying its health using systemctl is-system-running. The update includes the command logic, a corresponding integration test, and comprehensive documentation. Feedback was provided to improve the robustness of the health check by adding the --wait flag to the systemctl command and to remove an unnecessary -- separator from the SSH arguments to ensure consistency with existing command-line behavior.
Add `bcvk ephemeral test-basic <image>` which boots an ephemeral VM and verifies systemd reached a healthy state via `systemctl is-system-running`. This provides a quick smoke test for bootc container images. Assisted-by: Claude Code (Opus 4.6) Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
|
|
cgwalters
left a comment
There was a problem hiding this comment.
I know I suggested this as a kind of offhand comment, but a few things here.
- Commands we expose should generally also appear as varlink; maybe going forward we actually try to have the CLI be sugar around varlink just to force this
- If we're making "is system healthy" commands probably it should apply to libvirt too?
- Bigger picture...I would really like bcvk to help be an awesome component of testing frameworks - but without growing into a complete framework itself ideally. But in that vein we need to ask how to make this extensible
Combining the above...one thing I was thinking about here and have some code towards in an unpushed commit is - what if we bridged e.g. the dbus socket or systemd dbus/varlink itself? Worth investigating because then it becomes way more flexible, we aren't just hardcoding one systemd API call.
|
Blah, our AW deployment only works on branches starting with agent/. xref #356 |
A quick "does this image boot healthy" check is what most CI consumers of bcvk end up writing by hand with run-ssh, so give it a name: `bcvk ephemeral test-basic IMAGE` is shorthand for run-ssh with `systemctl is-system-running --wait`, which also lists the failed units when the system comes up degraded, and exits non-zero unless it reaches "running". Now that bcvk masks bootloader-update.service, stock images reach "running" in an ephemeral VM, so a degraded state really means something is wrong with the image. Rather than duplicating run-ssh's VM lifecycle and SSH handling, it re-executes bcvk as run-ssh with the same arguments, so it can't drift from it. The options are still declared (flattened from `ephemeral run`) so they are validated up front and show up in --help and the man page. Based on bootc-dev#244 by Xiaofeng Wang and the automated follow-up bootc-dev#357, reworked per review there. Closes: bootc-dev#356 Generated-by: AI
A quick "does this image boot healthy" check is what most CI consumers of bcvk end up writing by hand with run-ssh, so give it a name: `bcvk ephemeral test-basic IMAGE` is shorthand for run-ssh with `systemctl is-system-running --wait`, which also lists the failed units when the system comes up degraded, and exits non-zero unless it reaches "running". Now that bcvk masks bootloader-update.service, stock images reach "running" in an ephemeral VM, so a degraded state really means something is wrong with the image. Rather than duplicating run-ssh's VM lifecycle and SSH handling, it re-executes bcvk as run-ssh with the same arguments, so it can't drift from it. The options are still declared (flattened from `ephemeral run`) so they are validated up front and show up in --help and the man page. Based on bootc-dev#244 by Xiaofeng Wang and the automated follow-up bootc-dev#357, reworked per review there. Closes: bootc-dev#356 Generated-by: AI
A quick "does this image boot healthy" check is what most CI consumers of bcvk end up writing by hand with run-ssh, so give it a name: `bcvk ephemeral test-basic IMAGE` is shorthand for run-ssh with `systemctl is-system-running --wait`, which also lists the failed units when the system comes up degraded, and exits non-zero unless it reaches "running". Now that bcvk masks bootloader-update.service, stock images reach "running" in an ephemeral VM, so a degraded state really means something is wrong with the image. Rather than duplicating run-ssh's VM lifecycle and SSH handling, it re-executes bcvk as run-ssh with the same arguments, so it can't drift from it. The options are still declared (flattened from `ephemeral run`) so they are validated up front and show up in --help and the man page. Based on bootc-dev#244 by Xiaofeng Wang and the automated follow-up bootc-dev#357, reworked per review there. Closes: bootc-dev#356 Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
A quick "does this image boot healthy" check is what most CI consumers of bcvk end up writing by hand with run-ssh, so give it a name: `bcvk ephemeral test-basic IMAGE` is shorthand for run-ssh with `systemctl is-system-running --wait`, which also lists the failed units when the system comes up degraded, and exits non-zero unless it reaches "running". Now that bcvk masks bootloader-update.service, stock images reach "running" in an ephemeral VM, so a degraded state really means something is wrong with the image. Rather than duplicating run-ssh's VM lifecycle and SSH handling, it re-executes bcvk as run-ssh with the same arguments, so it can't drift from it. The options are still declared (flattened from `ephemeral run`) so they are validated up front and show up in --help and the man page. Based on #244 by Xiaofeng Wang and the automated follow-up #357, reworked per review there. Closes: #356 Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
|
Thanks so much for starting this! This ended up being rebased and tweaked a bit in #393 Which now that I look basically ignored my comments on #244 (review) so...sorry we probably could have just landed what was here. I'll file another issue for followups! |
Add
bcvk ephemeral test-basic <image>which boots an ephemeral VM and verifies systemd reached a healthy state viasystemctl is-system-running. This provides a quick smoke test for bootc container images.Assisted-by: Claude Code (Opus 4.6)