[Gluster-devel] gluster 3.1, glusterfsd does not consider deviant hostnames

Sven Kummer skummer at rapidsoft.de
Thu Mar 3 19:34:04 UTC 2011


Hey guys,

for security and speed reasons I tried to bind glusterd and glusterfsd internal interfaces of my 2 storage nodes.
Binding glusterd to internal interface works without problems. After starting glusterd I find out, that glusterfsd
does not consider any interface parameters.

I checked the source and found this snippet in xlators/mgmt/glusterd/src/glusterd-utils.c

        snprintf (cmd_str, 8192,
                  "%s/sbin/glusterfsd --xlator-option %s-server.listen-port=%d "
                  "-s localhost --volfile-id %s -p %s --brick-name %s "
                  "--brick-port %d -l %s", GFS_PREFIX, volinfo->volname,
                  port, volfile, pidfile, brickinfo->path, port,
                  brickinfo->logfile);

It seems like glusterfsd binds the mount always to localhost. That's the reason, why my internal
interface constellation wont work.

I adjusted this part using the bricks hostname instead localhost, as you can see here:

        snprintf (cmd_str, 8192,
                  "%s/sbin/glusterfsd --xlator-option %s-server.listen-port=%d "
                  "-s %s --volfile-id %s -p %s --brick-name %s "
                  "--brick-port %d -l %s", GFS_PREFIX, volinfo->volname,
                  port, brickinfo->hostname, volfile, pidfile, brickinfo->path, port,
                  brickinfo->logfile);

After restarting glusterd and the volume mount, everything works nice and I can mount the volume properly.

I think the solution is okay, but better would be if glusterd considers the optionally --remote-host= parameter instead
the bricks host. Maybe anybody can tell me how I have to adjust it.

Regards,
Sven





More information about the Gluster-devel mailing list