All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "wangjie (P)" <wangjie88@huawei.com>,
	Michal Privoznik <mprivozn@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: eric.fangyi@huawei.com
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	[thread overview]
Message-ID: <fefb9893-fc15-bf1b-ed3c-e37c9dd66c65@redhat.com> (raw)
In-Reply-To: <4955ec04-1884-3a68-975f-8d72487c253c@huawei.com>

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	other threads:[~2019-06-11 15:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 13:06 [Qemu-devel] [PATCH] pr-manager-helper: fix pr process been killed when reconectting Jie Wang
2019-05-28 17:45 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2019-05-29  7:33   ` Michal Privoznik
2019-05-29  8:37     ` Jie Wang
2019-05-29  9:37       ` Paolo Bonzini
2019-05-29  9:34     ` Paolo Bonzini
2019-05-30 10:08       ` Michal Privoznik
2019-05-30 10:59         ` Paolo Bonzini
2019-06-11 13:51           ` wangjie (P)
2019-06-11 14:46             ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fefb9893-fc15-bf1b-ed3c-e37c9dd66c65@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eric.fangyi@huawei.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wangjie88@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.