From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ze3ED-0007JF-3I for qemu-devel@nongnu.org; Mon, 21 Sep 2015 11:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ze3E9-0006fq-Lj for qemu-devel@nongnu.org; Mon, 21 Sep 2015 11:42:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ze3E9-0006fh-EL for qemu-devel@nongnu.org; Mon, 21 Sep 2015 11:42:01 -0400 References: <1442834654-28198-1-git-send-email-prasanna.kalever@redhat.com> From: Eric Blake Message-ID: <56002543.9040908@redhat.com> Date: Mon, 21 Sep 2015 09:41:55 -0600 MIME-Version: 1.0 In-Reply-To: <1442834654-28198-1-git-send-email-prasanna.kalever@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oJ1tIKHp1eQ4k5xrDpFpVFSXiQQllSwe9" Subject: Re: [Qemu-devel] [PATCH v3 1/1] block/gluster: add support for multiple gluster backup volfile servers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Prasanna Kumar Kalever , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com, deepakcs@redhat.com, rtalur@redhat.com, bharata@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oJ1tIKHp1eQ4k5xrDpFpVFSXiQQllSwe9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 numb= ers. >=20 >=20 > 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 t= he > active servers. >=20 > This is equivalent to the backup-volfile-servers option supported by > mount.glusterfs (FUSE way of mounting gluster volume) >=20 > This patch depends on a recent fix in libgfapi raised as part of this w= ork: > http://review.gluster.org/#/c/12114/ (not merged yet) >=20 It would be nice to get that merged before we take this in qemu. > Credits: Sincere thanks to Kevin Wolf and > "Deepak C Shetty" for inputs and all their suppor= t >=20 Up to here is good. > v1: > multiple server addresses but common port number and transport type > pattern: URI syntax with query (?) delimitor > syntax: > file=3Dgluster[+transport-type]://server1:24007/testvol/a.img\ > ?backup-volfile-servers=3Dserver2&backup-volfile-servers=3Dser= ver3 But the changelog information here should instead occur... >=20 > Signed-off-by: Prasanna Kumar Kalever > --- =2E..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', 'pa= rallels', > - 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'v= hdx', > + '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. > =20 > ## > @@ -1794,6 +1794,43 @@ > '*read-pattern': 'QuorumReadPattern' } } > =20 > ## > +# @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', >=20 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --oJ1tIKHp1eQ4k5xrDpFpVFSXiQQllSwe9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWACVHAAoJEKeha0olJ0NqIHQH/jYtqzyKVMdIvf2F7H01Vzuz SFTLcPpbx7utH0L+2vn0R0S4V8S9en7T0p1ECvBzf3V4vB+skNm5P1Qu4+qg7Plr rysUmnqHfmhU3DGHxeQ3M9VTnN+4Z3x4mTM5KkxHv3d9kTtHDteKbR7PACdowjcb yqN4Fk4JOhG5fjZI7DwLfwDqDwoV8UVdcObm1i5uN2dcH075OOyqOEE5JsLRNJTQ eOYd0OWPoIrCMfgKu6Ghaa8TlZyG7vPE/BiWKGsfo+sAzDvkcbztv+H9JFLCp8we 5HTVpghDqP3Fragr8kfbA4FK1mxZvmQSHXxH6wQ6ywYWkQvPj5ZjUBMwL8Bvhe8= =2Nrd -----END PGP SIGNATURE----- --oJ1tIKHp1eQ4k5xrDpFpVFSXiQQllSwe9--