[Gluster-devel] Gluster Development Environment

Jeffrey Darcy jdarcy at redhat.com
Thu Jan 16 05:10:55 UTC 2014


----- Original Message -----

> I'm starting some gluster development and having to deal with virtual
> machines for test/debug seems a little bit to tedious. I was wondering if
> there is a way to start two (or more) servers in the same machine using
> different ports. Using something like that:

> # glusterfsd -f simple-server-0.vol
> # glusterfsd -f simple-server-1.vol
> # glusterfs -f simple-client.vol /mnt/data

> where simple-server-0.vol simple-server-1.vol use different TCP ports?

For translator development, I usually find it's most convenient to start glusterfsd etc. by hand with hand-crafted volfiles as you suggest. The key is to set the following options: 

protocol/server: option transport.socket.listen-port XXXX 
protocol/client: option remote-port XXXX 

The other alternative is to do what some of our regression tests do, and start multiple glusterds bound to different addresses within the 127.x.x.x address space. See tests/cluster.rc for an example. The key command-line pieces to avoid conflicts in this case are: 

--xlator-option management.transport.socket.bind-address=xxx 
--xlator-option management.glusterd-sockfile=xxx 
--xlator-option management.working-directory=xxx 
--log-file=xxx 
--pid-file=xxx 

Then you can use the --remote-host option on the CLI to direct normal commands to one member of the (pseudo-)cluster. Y ou can also use docker/vagrant/LXC as James suggests. It's sort of a personal preference. For myself, I usually stick with the hacked-volfile approach, or (if I've added the code to generate the right volfiles) just start multiple bricks on the same machine and attach to them with gdb as needed. The other approaches are mostly useful for debugging glusterd itself, or for testing specific failure scenarios. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140116/e1c8d7c4/attachment-0001.html>


More information about the Gluster-devel mailing list