New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime-rs: Log qemu's stderr in shim log #8938
runtime-rs: Log qemu's stderr in shim log #8938
Conversation
This fixes a flaw pointed out in review of PR kata-containers#8185. Creation of the directory semantically fits better into VM preparation than VM launch. Signed-off-by: Pavel Mores <pmores@redhat.com>
Just a nit, can we prefix PRs that target runtime-rs with |
I'm sorry, I thought the prefix only applies to commit messages and didn't realise that it applies to PR titles as well. Next time around (I don't think I can fix it for this one)! |
Yes you can. There's an |
We'll want to capture qemu's stderr in parallel with normal runtime-rs execution. Tokio's primitives make this much easier than std's. This also makes child process management more consistent across runtime-rs (i.e. virtiofsd child process is already launched and managed using tokio). Some changes were necessary due to tokio functions being slightly different from their std counterparts. Child::kill() is now async and Child::id() now returns an Option. Signed-off-by: Pavel Mores <pmores@redhat.com>
Qemu stderr monitoring runs in its own asynchronous green thread. For that, `stderr` is taken out of the Child representing the qemu child process to avoid partial move and make it possible for the main thread still to call functions on QemuInner::qemu_process (e.g. kill(), id()). Fixes kata-containers#8937 Signed-off-by: Pavel Mores <pmores@redhat.com>
40be3ad
to
d53edbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @pmores !
/test |
Having a ready access to qemu's stderr is immensely helpful in debugging qemu's launch failures. Qemu's stderr output is now included in regular shim's log (look for lines prepended with "qemu stderr: ").
An unrelated small fix promised in review of PR #8185 is also included in this PR's initial commit.