[PATCH] qemu: use a fixed directory for saving qmp capabilities process

Jiri Denemark jdenemar at redhat.com
Tue Jul 14 07:32:49 UTC 2020


On Tue, Jul 14, 2020 at 11:20:00 +0800, Bihong Yu wrote:
> >From c7ee36417b88df7dcfe5e18d1eb72b6d7c175268 Mon Sep 17 00:00:00 2001
> From: Bihong Yu <yubihong at huawei.com>
> Date: Tue, 14 Jul 2020 11:17:46 +0800
> Subject: [PATCH] qemu: use a fixed directory for saving qmp capabilities
>  process
> 
> In some case, the qmp capabilities process possible residues. So we need to
> cleanup the residual process during start libvirt. For this reason, we
> should use a fixed directory for saving qmp capabilities process.
> 
> Change-Id: I6a74a046e192eee169a0e2677ce3aed9ded5e0ed
> Signed-off-by:Bihong Yu <yubihong at huawei.com>
> ---
>  src/qemu/qemu_process.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)

We can't do this because this code is used in more places than just QMP
capabilities probing. Specifically, APIs for CPU comparison and baseline
on s390x are passed to QEMU using this code. Which means we can have
multiple QEMU processes running at the same time.

We should rather make sure such temporary directories are not left
behind and possible cleanup them when QEMU driver starts to remove those
which were left behind when libvirtd gets restarted.

NACK




More information about the libvir-list mailing list