From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZYX3-00018H-3n for qemu-devel@nongnu.org; Wed, 09 Sep 2015 02:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZYX1-00016D-Qv for qemu-devel@nongnu.org; Wed, 09 Sep 2015 02:06:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZYX1-00012a-Hy for qemu-devel@nongnu.org; Wed, 09 Sep 2015 02:06:55 -0400 References: <1441717449-31609-1-git-send-email-prasanna.kalever@redhat.com> <20150908150204.GI4307@redhat.com> From: Deepak C Shetty Message-ID: <55EFCC7A.8060002@redhat.com> Date: Wed, 9 Sep 2015 11:36:50 +0530 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------090509040407040400000909" Subject: Re: [Qemu-devel] [PATCH 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: Deepak Shetty , "Daniel P. Berrange" Cc: rtalur@redhat.com, Prasanna Kumar Kalever , qemu-devel@nongnu.org, bharata@linux.vnet.ibm.com This is a multi-part message in MIME format. --------------090509040407040400000909 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 09/08/2015 08:40 PM, Deepak Shetty wrote: > > > On Tue, Sep 8, 2015 at 8:32 PM, Daniel P. Berrange > >wrote: > > On Tue, Sep 08, 2015 at 06:34:09PM +0530, Prasanna Kumar Kalever > wrote: > > This patch adds a way to specify multiple backup volfile servers > to the gluster > > block backend of QEMU with both tcp and rdma transport types. > > > > Problem: > > > > Currenly VM Image on gluster volume is specified like this: > > > > file=gluster[+tcp]://server1:24007/testvol/a.img > > > > Assuming we have have three servers in trustred pool with > replica 3 volume > > in action and unfortunately server1 (mentioned in the command > above) went down > > for some reason, since the volume is replica 3 we now have other > 2 servers > > active from which we can boot the VM. > > > > But currently there is no mechanism to pass the other 2 gluster > server > > addresses to qemu. > > > > Solution: > > > > New way of specifying VM Image on gluster volume with backup > volfile servers: > > > > file=gluster[+transport-type]://server1:24007/testvol/a.img\ > > ?backup-volfile-servers=server2&backup-volfile-servers=server3 > > Comparison with RBD syntax: > > file=rbd:pool/image:auth_supported=none:\ > mon_host=mon1.example.org > \:6321\;mon2.example.org > \:6322\;\ > mon3.example.org \:6322,if=virtio,format=raw > > As Peter already mentioned, you're missing port numbers. > > It is slightly unpleasant to have different ways of specifying the > first > vs second, third, etc hosts. I wonder if it would be nicer to keep all > the hostnames in the host part of the URI. eg > > file=gluster[+transport-type]://server1:24007,server2:3553,server3:2423/testvol/a.img\ > ?backup-volfile-servers=server2&backup-volfile-servers=server3 > > Of course it ceases to be a wellformed URI at that point, so > another option > would be to just allow the host part of the URI to be optional, > and then > accept mutliple instances ofa 'server' arg, eg > > file=gluster[+transport-type]:///testvol/a.img\ > ?server=server1:2424&server=server2:2423&sever=server3:34222 > > > Is it allowed to have this syntax and be a valid URI ? I admit i > haven't looked at the > URI rfc for a long time now, hence the Q. Also looking at rbd syntax, > it looks > to follow this model already is it ? Whats the difference between > using ':' to > separate key=value pairs Vs using '?" query syntax ? Should we look at > having > a uniform way of specifying URI be it rbd or gluster or sheepdog ... ? > If yes > what that uniform syntax be using ':" or '?" ? Answering myself, based on what I figured .... :) Looks like rbd syntax is a propertiary one and not adhering to URI rfc, while gluster syntax is URI compliant so the 2nd option suggested by danpb seems good Also need to ensure that old syntax of providing server:port in the authority field should be honoured so that older clients/apps generating the old syntax won't be broken thanx, deepak --------------090509040407040400000909 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On 09/08/2015 08:40 PM, Deepak Shetty wrote:


On Tue, Sep 8, 2015 at 8:32 PM, Daniel P. Berrange <<= a class=3D"moz-txt-link-abbreviated" href=3D"mailto:berrange@redhat.com">= berrange@redhat.com> wrote:
On Tue, Sep 08, 2015 at 06:34:09PM +0530, Prasanna Kumar Kalever wrote:
> This patch adds a way to specify multiple backup volfile servers to the gluster
> block backend of QEMU with both tcp and rdma transport types.
>
> Problem:
>
> Currenly VM Image on gluster volume is specified like this:
>
> file=3Dgluster[+tcp]://server1:24007/testvol/a.img=
>
> Assuming we have have three servers in trustred pool with replica 3 volume
> in action and unfortunately server1 (mentioned in the command above) went down
> for some reason, since the volume is replica 3 we now have other 2 servers
> active from which we can boot the VM.
>
> But currently there is no mechanism to pass the other 2 gluster server
> addresses to qemu.
>
> Solution:
>
> New way of specifying VM Image on gluster volume with backup volfile servers:
>
> file=3Dgluster[+transport-type]://server1:24007/testvol= /a.img\
>=C2=A0 =C2=A0 =C2=A0 ?backup-volfile-servers=3Dserver2&backup-volfile-se= rvers=3Dserver3

Comparison with RBD syntax:

=C2=A0 file=3Drbd:pool/image:auth_supported=3Dnone:\=
=C2=A0 =C2=A0 mon_host=3Dmon1.example.org\:6321\;= mon2.example.org\:6322\;\
=C2=A0 =C2=A0
mon3.example.org\:6322,i= f=3Dvirtio,format=3Draw

As Peter already mentioned, you're missing port numbers.<= /tt>

It is slightly unpleasant to have different ways of specifying the first
vs second, third, etc hosts. I wonder if it would be nicer to keep all
the hostnames in the host part of the URI. eg
=C2=A0file=3Dgluster[+transport-type]://server1:24007,server2:3553,server= 3:2423/testvol/a.img\
=C2=A0 =C2=A0 =C2=A0 ?backup-volfile-servers=3Dserver2&backup-volfile-serv= ers=3Dserver3

Of course it ceases to be a wellformed URI at that point, so another option
would be to just allow the host part of the URI to be optional, and then
accept mutliple instances ofa=C2=A0 'server' arg, eg=

=C2=A0file=3Dgluster[+transport-type]:///testvol/a.img\
=C2=A0 =C2=A0 =C2=A0 ?server=3Dserver1:2424&server=3Dserver2:2423&seve= r=3Dserver3:34222


Is it allowed to have this syntax and be a valid URI ? I admit i haven't looked at the
URI rfc for a long time now, hence the Q. Also looking at rbd syntax, it looks
to follow this model already is it ? Whats the difference between using ':' to
separate key=3Dvalue pairs Vs using '?" query syntax ? Should we look at having
a uniform way of specifying URI be it rbd or gluster or sheepdog ... ? If yes
what that uniform syntax be using ':" or '?" ?<= tt>

Answering myself, based on what I figured .... :)
Looks like rbd syntax is a propertiary one and not adhering to URI rfc, while gluster syntax
is URI compliant so the 2nd option suggested by danpb seems good
Also need to ensure that old syntax of providing server:port in the authority field should
be honoured so that older clients/apps generating the old syntax won't be broken

thanx,
deepak

--------------090509040407040400000909--