Skip to content
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

Merged
merged 3 commits into from
Jan 31, 2024

Commits on Jan 27, 2024

  1. runtime-rs: move creation of VM path from start_vm() to prepare_vm()

    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>
    pmores committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    b52a398 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. runtime-rs: switch qemu child process management from std to tokio

    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>
    pmores committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    684d740 View commit details
    Browse the repository at this point in the history
  2. runtime-rs: collect qemu stderr and log it in shim log

    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>
    pmores committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d53edbd View commit details
    Browse the repository at this point in the history