runtime-rs: fix misleading log message

get_vmm_master_tid() currently returns an error with the message "cannot
get qemu pid (though it seems running)" when it finds a valid
QemuInner::qemu_process instance but fails to extract the PID out of it.

This condition however in fact means that a qemu child process was running
(otherwise QemuInner::qemu_process would be None) but isn't anymore (id()
returns None).

Signed-off-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
Pavel Mores 2024-06-18 12:11:59 +02:00 committed by Pavel Mores
parent af5492e773
commit 6a4919eeb9

View File

@ -231,7 +231,7 @@ impl QemuInner {
);
Ok(qemu_pid)
} else {
Err(anyhow!("cannot get qemu pid (though it seems running)"))
Err(anyhow!("QemuInner::get_vmm_master_tid(): qemu process isn't running (likely stopped already)"))
}
} else {
Err(anyhow!("qemu process not running"))