qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Prívozník" <mprivozn@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/5] pr-manager: add query-pr-managers QMP command
Date: Thu, 28 Jun 2018 09:05:29 +0200	[thread overview]
Message-ID: <7c40a4b2-1a4e-8ace-a58f-a6419ffd6df1@redhat.com> (raw)
In-Reply-To: <8c63167d-c5e4-5fe4-ddae-5c69c7fd46e0@redhat.com>

On 06/27/2018 05:44 PM, Paolo Bonzini wrote:
> On 26/06/2018 18:31, Michal Privoznik wrote:
>>>  
>>> +static bool pr_manager_helper_is_connected(PRManager *p)
>>> +{
>>> +    PRManagerHelper *pr_mgr = PR_MANAGER_HELPER(p);
>>> +    bool result;
>>> +
>>> +    qemu_mutex_lock(&pr_mgr->lock);
>>> +    result = (pr_mgr->ioc != NULL);
>> I worry it is not that easy. pr_mgr->ioc is unset only when there's
>> PR_IN/PR_OUT command coming from the guest (in pr_manager_helper_run ->
>> pr_manager_helper_write). In fact, after 5/5 that is also the time when
>> the event is delivered. But that might be too late for mgmt app to
>> restart the helper process (although pr_manager_helper_run() tries to
>> reconnect for 5 seconds before giving up).
> 
> That's true, however the important thing IMO is to have a QMP interface
> that libvirt can use; everything else is just quality of implementation.
> 
> qemu-pr-helper anyway does something only when a guests sends it a PR
> command - and with libvirt's per-guest model, that would (hopefully)
> mean that the only case that remains is when someone manually kills the
> qemu-pr-helper process.  In that case there's a certain amount of PEBKAC
> involved... :)

Unless an assert() is triggered ;-)

But since you merged my suggested changes in 5/5 libvirt can catch the
event pretty soon, so in my testing qemu was still left with 3-4
connection retries which is plenty.

Michal

  reply	other threads:[~2018-06-28  7:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 15:40 [Qemu-devel] [PATCH 0/5] pr-manager/qemu-pr-helper patches for QEMU 3.0 Paolo Bonzini
2018-06-26 15:40 ` [Qemu-devel] [PATCH 1/5] pr-helper: fix --socket-path default in help Paolo Bonzini
2018-06-26 16:13   ` Philippe Mathieu-Daudé
2018-06-26 16:24   ` Michal Privoznik
2018-06-26 15:40 ` [Qemu-devel] [PATCH 2/5] pr-helper: fix assertion failure on failed multipath PERSISTENT RESERVE IN Paolo Bonzini
2018-06-26 16:16   ` Philippe Mathieu-Daudé
2018-06-26 16:25   ` Michal Privoznik
2018-06-26 15:40 ` [Qemu-devel] [PATCH 3/5] pr-manager-helper: avoid SIGSEGV when writing to the socket fail Paolo Bonzini
2018-06-26 16:24   ` Michal Privoznik
2018-06-26 15:40 ` [Qemu-devel] [PATCH 4/5] pr-manager: add query-pr-managers QMP command Paolo Bonzini
2018-06-26 16:31   ` Michal Privoznik
2018-06-27 15:44     ` Paolo Bonzini
2018-06-28  7:05       ` Michal Prívozník [this message]
2018-06-28  7:08         ` Paolo Bonzini
2018-06-26 20:51   ` Eric Blake
2018-06-27 15:34     ` Paolo Bonzini
2018-06-26 15:40 ` [Qemu-devel] [PATCH 5/5] pr-manager-helper: report event on connection/disconnection Paolo Bonzini
2018-06-26 16:23   ` Philippe Mathieu-Daudé
2018-06-27  8:04   ` Michal Privoznik
2018-06-27 10:16   ` Michal Privoznik
2018-06-27 15:35     ` Paolo Bonzini

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=7c40a4b2-1a4e-8ace-a58f-a6419ffd6df1@redhat.com \
    --to=mprivozn@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).