From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 09/13] nbd: pick first exported volume if no export name is requested
Date: Tue, 19 Jan 2016 17:14:32 +0100 [thread overview]
Message-ID: <569E60E8.2040001@redhat.com> (raw)
In-Reply-To: <1453208963-16834-10-git-send-email-berrange@redhat.com>
On 19/01/2016 14:09, Daniel P. Berrange wrote:
> The NBD client is currently only capable of using the new style
> protocol negotiation if an explicit export name is provided.
> This is a problem, because TLS support will require use of the
> new style protocol in all cases, and we wish to keep the export
> name as an optional request for backwards compatibility.
>
> The trivial way to deal with this is to use the NBD protocol
> option for listing exports and then pick the first returned
> export as the one to use. This makes the client "do the right
> thing" in the normal case where the qemu-nbd server only
> exports a single volume.
>
> Furthermore, in order to get proper error reporting of unknown
> options with fixed new style protocol, we must not send the
> NBD_OPT_EXPORT_NAME as the first thing. Thus, even if an export
> name is provided we still send NBD_OPT_LIST to enumerate server
> exports. This also gives us clearer error reporting in the case
> that the requested export name does not exist. If NBD_OPT_LIST
> is not supported, we still fallback to using the specified
> export name, so as not to break compatibility with old QEMU
> NBD server impls that predated NBD_OPT_LIST
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
As a first reaction, I would really avoid magic unless the server
provides a single exports. But even in that case, I would prefer to
have some synchronization between the server and client command-line.
Is an empty NBD_OPT_EXPORT_NAME valid? What about using new-style
negotiation with empty NBD_OPT_EXPORT_NAME if TLS is requested?
Paolo
next prev parent reply other threads:[~2016-01-19 16:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 13:09 [Qemu-devel] [PATCH v3 00/13] Implement TLS support to QEMU NBD server & client Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 01/13] nbd: convert block client to use I/O channels for connection setup Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 02/13] nbd: convert qemu-nbd server " Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 03/13] nbd: convert blockdev NBD " Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 04/13] nbd: convert to using I/O channels for actual socket I/O Daniel P. Berrange
2016-01-19 16:08 ` Paolo Bonzini
2016-01-19 16:52 ` Daniel P. Berrange
2016-01-19 18:00 ` Paolo Bonzini
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 05/13] nbd: invert client logic for negotiating protocol version Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 06/13] nbd: make server compliant with fixed newstyle spec Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 07/13] nbd: make client request fixed new style if advertized Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 08/13] nbd: allow setting of an export name for qemu-nbd server Daniel P. Berrange
2016-01-19 16:12 ` Paolo Bonzini
2016-01-19 16:48 ` Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 09/13] nbd: pick first exported volume if no export name is requested Daniel P. Berrange
2016-01-19 16:14 ` Paolo Bonzini [this message]
2016-01-19 16:44 ` Daniel P. Berrange
2016-01-21 10:30 ` Paolo Bonzini
2016-01-21 14:26 ` Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 10/13] nbd: implement TLS support in the protocol negotiation Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 11/13] nbd: enable use of TLS with NBD block driver Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 12/13] nbd: enable use of TLS with qemu-nbd server Daniel P. Berrange
2016-01-19 13:09 ` [Qemu-devel] [PATCH v3 13/13] nbd: enable use of TLS with nbd-server-start command Daniel P. Berrange
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=569E60E8.2040001@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 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.