Add VM serial console logging for fast-cycle diagnosis#12
Merged
Conversation
VMs cycling in <60 seconds leave no trace of what failed inside them.
Firecracker's stdout (the serial console) was previously discarded.
- Add console=ttyS0 to DEFAULT_BOOT_ARGS so the VM's kernel and
systemd output goes to Firecracker's stdout
- Redirect Firecracker stdout to {work_dir}/console.log per slot
- After any cycle shorter than 60 seconds, log the last 40 lines of
the console to the manager journal so failures are visible without
manual intervention
- Include duration_secs in the "Firecracker exited" log line
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi @guifranchi, We've found some issues with your Pull Request.
|
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.
Problem
VMs cycle in ~1–2 seconds with
exit_code=0, but we have no visibility into what fails inside them. Firecracker's stdout (the VM serial console, where systemd/journald output goes) was discarded viaStdio::null().Changes
console=ttyS0added toDEFAULT_BOOT_ARGS— routes the VM kernel and systemd output to Firecracker's stdout (the serial console){work_dir}/console.logper slot — Firecracker stdout is now written to a file instead of/dev/nullslot.rs— after any cycle shorter than 60 seconds, the last 40 lines ofconsole.logare emitted to the manager journal at WARN level, with thecyclefield for correlationduration_secsadded to the "Firecracker exited" log line for easier cycle-length filteringEffect
journalctl -u actions-runnerwill now show the VM's systemd boot output, service start/stop messages, and any error fromconfig.shorrunner.serviceimmediately after each short cycle — no manual Firecracker test needed to diagnose failures.