From: "Daniel P. Berrange" <berrange@redhat.com>
To: Jeff Cody <jcody@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI
Date: Tue, 28 Feb 2017 12:49:11 +0000 [thread overview]
Message-ID: <20170228124911.GC2720@redhat.com> (raw)
In-Reply-To: <20170228123452.GQ25637@localhost.localdomain>
On Tue, Feb 28, 2017 at 07:34:52AM -0500, Jeff Cody wrote:
> On Tue, Feb 28, 2017 at 10:28:49AM +0000, Daniel P. Berrange wrote:
> > On Tue, Feb 28, 2017 at 10:16:51AM +0000, Daniel P. Berrange wrote:
> > > On Mon, Feb 27, 2017 at 10:57:44PM -0500, Jeff Cody wrote:
> > > > On Mon, Feb 27, 2017 at 04:47:54PM -0600, Eric Blake wrote:
> > > > > On 02/27/2017 12:58 PM, Jeff Cody wrote:
> > > > > > @@ -604,6 +620,29 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
> > > > > > goto failed_shutdown;
> > > > > > }
> > > > > >
> > > > > > + /* if mon_host was specified */
> > > > > > + if (host) {
> > > > > > + const char *hostname = host;
> > > > > > + char *mon_host = NULL;
> > > > > > +
> > > > > > + if (port) {
> > > > > > + mon_host = g_strdup_printf("%s:%s", host, port);
> > > > >
> > > > > Does Ceph care about IPv6 (in which case you may need [host]:port when
> > > > > host itself includes ':')?
> > > > >
> > > >
> > > > Some quick sanity testing seems to show that it does not need [] for ipv6
> > > > addresses, which is nice.
> > >
> > > Hmm, that is very odd to me, as that means parsing is ambiguous. The
> > > ceph 'mon_host' option allows the port to be omitted, so given a
> > > string 2001:242:24:23 there's no way of knowing whether it is
> > > a IPv6 addr 2001:242:24:23, with no port, or an addr 2001:242:24 with
> > > port of 23
> >
> > Looking at the source code to ceph it appears that if you omit the
> > use of [], then it will treat the entire string as being the address
> > without port. It does look to support use of [], so we should use
> > that IIUC.
>
> For the sake of clarity, when you say we should use [] for ipv6, you mean
> QEMU (rather than doing it in libvirt)?
Yes, in QAPI JSON, it should be the bare IPv6 address in the server
host field. When QEMU conbines the host + port to form the mon_host
string, it must add [] if it sees the host from QAPI is a raw IPv6
address
> > https://blog.widodh.nl/2014/11/ceph-with-a-cluster-and-public-network-on-ipv6/
> >
> > See also entity_addr_t::parse in $CEPH/src/msg/msg_types.cc which is
> > what I think parses the mon addr. NB, I've not tested this yet, so
> > if you have a live ceph cluster with ipv6, it'd be good to verify that
> > using [] is correct.
> >
>
> Do you think this needs to be in place before either A) we pull the series
> for softfreeze, or B) 2.10? I.e., is this something we can fix up later?
> It is OK if not, but I have a flight leaving soon and can't work on the
> series anymore -- so depending on this and how v3 review goes, we may just
> need to slip the series to 2.10.
The fix doesn't affect QAPI protocol spec, so as long as it is fixed
before 2.9 release it'd be ok.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
prev parent reply other threads:[~2017-02-28 12:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 18:58 [Qemu-devel] [PATCH v2 0/5] RBD: blockdev-add Jeff Cody
2017-02-27 18:58 ` [Qemu-devel] [PATCH v2 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok() Jeff Cody
2017-02-27 19:46 ` Markus Armbruster
2017-02-27 21:26 ` Eric Blake
2017-02-27 18:58 ` [Qemu-devel] [PATCH v2 2/5] block/rbd: add all the currently supported runtime_opts Jeff Cody
2017-02-27 22:18 ` Eric Blake
2017-02-27 22:24 ` Jeff Cody
2017-02-27 18:58 ` [Qemu-devel] [PATCH v2 3/5] block/rbd: parse all options via bdrv_parse_filename Jeff Cody
2017-02-27 22:35 ` Eric Blake
2017-02-27 22:56 ` Jeff Cody
2017-02-27 23:15 ` Eric Blake
2017-02-27 18:58 ` [Qemu-devel] [PATCH v2 4/5] block/rbd: add blockdev-add support Jeff Cody
2017-02-27 22:40 ` Eric Blake
2017-02-27 18:58 ` [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI Jeff Cody
2017-02-27 19:54 ` Daniel P. Berrange
2017-02-27 22:47 ` Eric Blake
2017-02-27 23:02 ` Jeff Cody
2017-02-28 3:57 ` Jeff Cody
2017-02-28 10:16 ` Daniel P. Berrange
2017-02-28 10:28 ` Daniel P. Berrange
2017-02-28 12:34 ` Jeff Cody
2017-02-28 12:49 ` Daniel P. Berrange [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=20170228124911.GC2720@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=jcody@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.