From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwoSx-0007He-8g for qemu-devel@nongnu.org; Thu, 12 Nov 2015 04:46:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwoSu-0003l7-IF for qemu-devel@nongnu.org; Thu, 12 Nov 2015 04:46:51 -0500 Received: from mx3-phx2.redhat.com ([209.132.183.24]:58585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwoSu-0003kz-73 for qemu-devel@nongnu.org; Thu, 12 Nov 2015 04:46:48 -0500 Date: Thu, 12 Nov 2015 04:46:42 -0500 (EST) From: Prasanna Kumar Kalever Message-ID: <1866115024.9436901.1447321602774.JavaMail.zimbra@redhat.com> In-Reply-To: <20151110172425.GI1600@localhost.localdomain> References: <1447146556-7328-1-git-send-email-prasanna.kalever@redhat.com> <1447146556-7328-4-git-send-email-prasanna.kalever@redhat.com> <20151110172425.GI1600@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v13 3/3] block/gluster: add support for multiple gluster servers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, pkrempa@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, deepakcs@redhat.com, bharata@linux.vnet.ibm.com, rtalur@redhat.com On Tuesday, November 10, 2015 10:54:25 PM, Jeff Cody wrote: > > On Tue, Nov 10, 2015 at 02:39:16PM +0530, Prasanna Kumar Kalever wrote: > > This patch adds a way to specify multiple volfile servers to the gluster > > block backend of QEMU with tcp|rdma transport types and their port numbers. > > > > Problem: > > > > Currently VM Image on gluster volume is specified like this: > > > > file=gluster[+tcp]://host[:port]/testvol/a.img > > > > Assuming we have three hosts in trusted pool with replica 3 volume > > in action and unfortunately host (mentioned in the command above) went down > > for some reason, since the volume is replica 3 we now have other 2 hosts > > active from which we can boot the VM. > > > > But currently there is no mechanism to pass the other 2 gluster host > > addresses to qemu. > > > > Solution: > > > > New way of specifying VM Image on gluster volume with volfile servers: > > (We still support old syntax to maintain backward compatibility) > > > > Basic command line syntax looks like: > > > > Pattern I: > > -drive driver=gluster, > > volume=testvol,path=/path/a.raw, > > servers.0.host=1.2.3.4, > > [servers.0.port=24007,] > > [servers.0.transport=tcp,] > > servers.1.host=5.6.7.8, > > [servers.1.port=24008,] > > [servers.1.transport=rdma,] ... > > > > Pattern II: > > 'json:{"driver":"qcow2","file":{"driver":"gluster", > > "volume":"testvol","path":"/path/a.qcow2", > > "servers":[{tuple0},{tuple1}, ...{tupleN}]}}' > > > > driver => 'gluster' (protocol name) > > volume => name of gluster volume where our VM image resides > > path => absolute path of image in gluster volume > > > > {tuple} => {"host":"1.2.3.4"[,"port":"24007","transport":"tcp"]} > > > > host => host address (hostname/ipv4/ipv6 addresses) > > port => port number on which glusterd is listening. (default > > 24007) > > transport => transport type used to connect to gluster management > > daemon, > > it can be tcp|rdma (default 'tcp') > > > > Examples: > > 1. > > -drive driver=qcow2,file.driver=gluster, > > file.volume=testvol,file.path=/path/a.qcow2, > > file.servers.0.host=1.2.3.4, > > file.servers.0.port=24007, > > file.servers.0.transport=tcp, > > file.servers.1.host=5.6.7.8, > > file.servers.1.port=24008, > > file.servers.1.transport=rdma > > 2. > > 'json:{"driver":"qcow2","file":{"driver":"gluster","volume":"testvol", > > "path":"/path/a.qcow2","servers": > > [{"host":"1.2.3.4","port":"24007","transport":"tcp"}, > > {"host":"4.5.6.7","port":"24008","transport":"rdma"}] } }' > > > > This patch gives a mechanism to provide all the server addresses, which are > > in > > replica set, so in case host1 is down VM can still boot from any of the > > active hosts. > > > > This is equivalent to the backup-volfile-servers option supported by > > mount.glusterfs (FUSE way of mounting gluster volume) > > > > Credits: Sincere thanks to Kevin Wolf and > > "Deepak C Shetty" for inputs and all their support > > > > Signed-off-by: Prasanna Kumar Kalever > > > Previous versions of this commit mentioned that the new functionality > is dependent on a recent fix in libgfapi. This commit message is > missing that line; does its absence mean that the new functionality is > not dependent on any particular libgfapi version? > > What happens if the new functionality is tried on the last stable > libgfapi release? Sorry for not removing this since long, actually the libgfapi fix is for defaults values i.e. When glfs_set_volfile_server is invocated multiple times, only on the first invocation gfapi code replace port 0 with 24007 and transport NULL with "tcp". Any have to remove this dependency, I have put up code that will take care of defaults. Thanks, -prasanna Hence, replacing the parameters at the entry function is the right way. > > Thanks! > Jeff > >