gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] Gluster Development Environment


From: Jeffrey Darcy
Subject: Re: [Gluster-devel] Gluster Development Environment
Date: Thu, 16 Jan 2014 00:10:55 -0500 (EST)




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.  You 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]