qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper
Date: Thu, 21 Sep 2017 18:20:18 +0200	[thread overview]
Message-ID: <3952279a-b001-db23-ce5f-763bbcadd996@redhat.com> (raw)
In-Reply-To: <ddc23258-0e68-f2e3-72a3-c16e443a7143@redhat.com>

On 19/09/2017 15:23, Paolo Bonzini wrote:
> On 19/09/2017 15:12, Daniel P. Berrange wrote:
>> On Tue, Sep 19, 2017 at 02:57:00PM +0200, Paolo Bonzini wrote:
>>> On 19/09/2017 14:53, Daniel P. Berrange wrote:
>>>>> +    /* Try to reconnect while sending the CDB.  */
>>>>> +    for (attempts = 0; attempts < PR_MAX_RECONNECT_ATTEMPTS; attempts++) {
>>>>
>>>> I'm curious why you need to loop here. The helper daemon should be running
>>>> already, as you're not spawning it on demand IIUC. So it shoudl either
>>>> succeed first time, or fail every time.
>>>
>>> You're focusing on the usecase where the helper daemon is spawned per-VM
>>> by the system libvirtd, which I agree is the most important one.
>>> However, the other usecase is the one with a global daemon, access to
>>> which is controlled via Unix permissions.  This is not SELinux-friendly,
>>> but it is nicer for testing and it is also the only possibility for user
>>> libvirtd.
>>>
>>> In that case, upgrading QEMU on the host could result in a "systemctl
>>> restart qemu-pr-helper.service" (or, hopefully unlikely, a crash could
>>> result in systemd respawning the daemon).  Reconnect is useful in that case.
>>
>> If using systemd socket activation and you restart the daemon, the listening
>> socket should be preserved, so you shouldn't need to reconnect - the client
>> should get queued until it has started again (likewise on crash).
> 
> Oh, that's cool.  I didn't know that.

... wait, I do need to reconnect, because the active socket is closed.
I only don't need to retry and wait between the retries.

Paolo

  parent reply	other threads:[~2017-09-21 16:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 10:24 [Qemu-devel] [PATCH v2 0/4] scsi, block: introduce persistent reservation managers Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 1/4] scsi, file-posix: add support for persistent reservation management Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 2/4] scsi: build qemu-pr-helper Paolo Bonzini
2017-09-19 13:33   ` Daniel P. Berrange
2017-09-19 14:25     ` Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 3/4] scsi: add multipath support to qemu-pr-helper Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper Paolo Bonzini
2017-09-19 12:50   ` Daniel P. Berrange
2017-09-19 12:53   ` Daniel P. Berrange
2017-09-19 12:57     ` Paolo Bonzini
2017-09-19 13:12       ` Daniel P. Berrange
2017-09-19 13:23         ` Paolo Bonzini
2017-09-19 13:26           ` Daniel P. Berrange
2017-09-19 14:32             ` Paolo Bonzini
2017-09-21 16:20           ` Paolo Bonzini [this message]
2017-09-21 16:07 ` [Qemu-devel] [Qemu-block] [PATCH v2 0/4] scsi, block: introduce persistent reservation managers Stefan Hajnoczi
2017-09-21 16:22 ` [Qemu-devel] " no-reply
2017-09-21 16:24 ` no-reply
2017-09-21 16:29   ` 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=3952279a-b001-db23-ce5f-763bbcadd996@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).