qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process been killed when reconectting
Date: Tue, 11 Jun 2019 16:46:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 11/06/19 15:51, wangjie (P) wrote:
> Hi, Paolo and Michal:
> 
> Base on my patch, I found another problem is that:
> 
>     qemu: report DISCONNECTED
> 
>     libvirt: start pr-helper #1, but it will takes a while to complete
> this action
> 
>     qemu: reconnect to start pr-helper #1 immediately and failed, so
> report DISCONNECTED
> 
>     libvirt: begin to call qemuProcessStartManagedPRDaemon to start
> pr-helper #2, but virPidFileAcquirePath failed, so close fd and unlink
> pidfile by mistake
> 
> 
> based on the above problem, I thought out two ways to fix this problem:
> 
> 1. qemu: when call pr_manager_helper_write failed, sleep one second to
> make sure libvirt had started pr-helper before call
> pr_manager_helper_initialize.
> 
> 2. libvirt: if virFileLock failed in virPidFileAcquirePath, not to close
> fd and unlink pidfile, because pr-helper #1 is using the pidfile.

I think this could also be fixed by using the socket activation protocol
in libvirt, because QEMU will be able to connect.  libvirt will have to
discard events from QMP right after it calls listen() on the socket.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]