qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>,
	qemu-devel@nongnu.org
Cc: kwolf@redhat.com, stefanha@gmail.com, deepakcs@redhat.com,
	rtalur@redhat.com, bharata@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v3 1/1] block/gluster: add support for multiple gluster backup volfile servers
Date: Mon, 21 Sep 2015 09:41:55 -0600	[thread overview]
Message-ID: <56002543.9040908@redhat.com> (raw)
In-Reply-To: <1442834654-28198-1-git-send-email-prasanna.kalever@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4989 bytes --]

On 09/21/2015 05:24 AM, Prasanna Kumar Kalever wrote:
> This patch adds a way to specify multiple backup volfile servers to the gluster
> block backend of QEMU with tcp|rdma transport types and their port numbers.
> 

> 
> This patch gives a mechanism to provide all the server addresses which are in
> replica set, so in case server1 is down VM can still boot from any of the
> active servers.
> 
> This is equivalent to the backup-volfile-servers option supported by
> mount.glusterfs (FUSE way of mounting gluster volume)
> 
> This patch depends on a recent fix in libgfapi raised as part of this work:
> http://review.gluster.org/#/c/12114/ (not merged yet)
> 

It would be nice to get that merged before we take this in qemu.

> Credits: Sincere thanks to Kevin Wolf <kwolf@redhat.com> and
> "Deepak C Shetty" <deepakcs@redhat.com> for inputs and all their support
> 

Up to here is good.

> v1:
> multiple server addresses but common port number and transport type
> pattern: URI syntax with query (?) delimitor
> syntax:
>     file=gluster[+transport-type]://server1:24007/testvol/a.img\
>          ?backup-volfile-servers=server2&backup-volfile-servers=server3

But the changelog information here should instead occur...


> 
> Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
> ---

...here, so that it is helpful to reviewers but doesn't clog qemu.git
history (a year from now, we won't care how many iterations a patch went
through, only what got committed).


> +++ b/qapi/block-core.json
> @@ -1382,7 +1382,7 @@
>    'data': [ 'archipelago', 'blkdebug', 'blkverify', 'bochs', 'cloop',
>              'dmg', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
>              'host_floppy', 'http', 'https', 'null-aio', 'null-co', 'parallels',
> -            'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'vhdx',
> +            'qcow', 'qcow2', 'qed', 'quorum', 'gluster', 'raw', 'tftp', 'vdi', 'vhdx',
>              'vmdk', 'vpc', 'vvfat' ] }

Please keep this list sorted.  Also, missing documentation that
'gluster' was added in 2.5.

>  
>  ##
> @@ -1794,6 +1794,43 @@
>              '*read-pattern': 'QuorumReadPattern' } }
>  
>  ##
> +# @GlusterTuplePattern

Name is long. Something like 'GlusterHost' would be nicer.

> +#
> +# Gluster tuple pattern
> +#
> +# @transport:    #transport type used to connect to gluster management daemon
> +#                 it can be tcp|rdma (default 'tcp')
> +#
> +# @port:         port number on which glusterd is listening. (default 24007)

To have a default, the parameter needs to be optional ('*port').

> +#
> +# @server:       server address (hostname/ipv4/ipv6 addresses)
> +#
> +# Since: 2.4+

s/2.4+/2.5/ (there is no 2.4+ release; the release that this will appear
in is 2.5)

> +##
> +{ 'struct': 'GlusterTuplePattern',
> +  'data': { 'server': 'str',
> +            'transport': 'str',

Yuck. Please don't open-code this as a 'str', but instead define it as
an enum:

{ 'enum': 'GlusterTransport', 'data': [ 'tcp', 'rdma' ] }

> +            'port': 'str' } }

Should port be an integer instead of a string? I guess we already allow
named ports in other network-related interfaces, but it would still be
nice to have an 'alternate' type that allows both integer and string.

It would be nice if your documentation of the parameters occurred in the
same order as the parameters appear in the 'struct'.

> +
> +##
> +# @BlockdevOptionsGluster
> +#
> +# Driver specific block device options for Gluster
> +#
> +# @volname:      name of gluster volume where our VM image resides
> +#
> +# @image-path:   absolute path to image file in gluster volume
> +#
> +# @backup-volfile-servers: holds multiple tuples of {server, transport, port}
> +#
> +# Since: 2.4+

s/2.4+/2.5/

> +##
> +{ 'struct': 'BlockdevOptionsGluster',
> +  'data': { 'volname': 'str',
> +            'image-path': 'str',
> +            'backup-volfile-servers': [ 'GlusterTuplePattern' ] } }

Shouldn't this be simply 'volfile-servers', as you are including the
primary server in addition to the backup servers?

> +
> +##
>  # @BlockdevOptions
>  #
>  # Options for creating a block device.
> @@ -1814,6 +1851,7 @@
>        'ftp':        'BlockdevOptionsFile',
>        'ftps':       'BlockdevOptionsFile',
>  # TODO gluster: Wait for structured options
> +      'gluster':    'BlockdevOptionsGluster',
>        'host_cdrom': 'BlockdevOptionsFile',
>        'host_device':'BlockdevOptionsFile',
>        'host_floppy':'BlockdevOptionsFile',
> 

There's also work on the list to expose NBD in a structured fashion; I'm
a bit worried that the two proposals might need to be sharing some
common functionality, rather than independently inventing slightly
different syntax.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-09-21 15:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 11:24 [Qemu-devel] [PATCH v3 1/1] block/gluster: add support for multiple gluster backup volfile servers Prasanna Kumar Kalever
2015-09-21 15:41 ` Eric Blake [this message]
2015-09-22  8:06   ` Prasanna Kalever
2015-09-23 15:04     ` Peter Krempa
2015-09-26  4:47       ` Prasanna Kalever

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=56002543.9040908@redhat.com \
    --to=eblake@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=deepakcs@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=prasanna.kalever@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rtalur@redhat.com \
    --cc=stefanha@gmail.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 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).