[Gluster-devel] Fixing Address family mess

Emmanuel Dreyfus manu at netbsd.org
Mon May 7 04:39:22 UTC 2012


Quick summary of the problem: when using transport-type socket with
transport.address-family unspecified, glusterfs binds sockets with
AF_UNSPEC, which will use either AF_INET or AF_INET6 socket, whatever the
kernel prefers. At mine it uses AF_INET6, while the machine is not
configured to use IPv6. As a result, glusterfs client cannot connect
to glusterfs server.

A workaround is to use option transport.address-family inet in
glusterfsd/glusterd.vol but that option must also be specified in
all volume files for all bricks and FUSE client, which is
unfortunate because they are automatically generated. I proposed a
patch so that glusterd transport.address-family setting is propagated
to various places: http://review.gluster.com/3261

That did not meet consensus. Jeff Darcy notes that we should be able
to listen both on AF_INET and AF_INET6 sockets at the same time. I
had a look at the code, and indeed it could easily be done. The only
trouble is how to specify the listeners. For now option transport
defaults to socket,rdma. I suggest we add socket families in that
specification. We would then have this default:
   option transport socket/inet,socket/inet6,rdma

With the following semantics:
   socket -> AF_UNSPEC socket (backward comaptibility)
   socket/inet -> AF_INET socket
   socket/inet6 -> AF_INET6 socket
   socket/sdp -> AF_SDP socket
   rdma -> sameas before

Any opinion on that plan? Please comment before I writa code, it will
save me some time is the proposal is wrong.

Emmanuel Dreyfus
manu at netbsd.org

More information about the Gluster-devel mailing list