Bug 1719290 - Glusterfs mount helper script not working with IPv6 because of regular expression or man is wrong
Summary: Glusterfs mount helper script not working with IPv6 because of regular expres...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-11 12:36 UTC by Aga
Modified: 2019-07-01 14:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-01 14:18:06 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 22884 0 None Merged core: use multiple servers while mounting a volume using ipv6 2019-07-01 14:18:05 UTC

Description Aga 2019-06-11 12:36:24 UTC
Version-Release number of selected component (if applicable): 5.6

Description of problem:
Based on man glusterfs I think this format should work: 

...
mount -t glusterfs [-o <options>] <server1>,<server2>,
              <server3>,..<serverN>:/<volname>[/<subdir>] <mount_point>
...

So list the servers and use , as the separator but as I see this doesn't work well unfortunatelly with IPv6 addresses.

Command to try:
mount -t glusterfs fd00:16::106,fd00:16::107:/oam /mnt/test1/

In the log I see next: 
[2019-06-11 12:25:16.453643] I [MSGID: 100030] [glusterfsd.c:2725:main] 0-/usr/sbin/glusterfs: Started running /usr/sbin/glusterfs version 5.6 (args: /usr/sbin/glusterfs --process-name fuse --volfile-server=fd00:16: --volfile-id=oam /mnt/test1)

So the ipv6 address is wrong. 

Possible solution: 

In this file: /usr/sbin/mount.glusterfs the following line is wrong (nearby line 720):
server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');
you should use this: 
server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%,.\-]*\):.*/\1/p');
Because of the , is missing from the regex after %

After I applied this patch relevant lines from log:
[2019-06-11 12:33:40.345671] I [MSGID: 100030] [glusterfsd.c:2725:main] 0-/usr/sbin/glusterfs: Started running /usr/sbin/glusterfs version 5.6 (args: /usr/sbin/glusterfs --process-name fuse --volfile-server=fd00:16::106 --volfile-server=fd00:16::107 --volfile-id=/oam /mnt/test1)

The IP looks like more better and the mount point is ok.


How reproducible:
Mount command provided above

Comment 1 Worker Ant 2019-06-17 12:41:23 UTC
REVIEW: https://review.gluster.org/22884 (core: use multiple servers while mounting a volume using ipv6) posted (#1) for review on master by Sanju Rakonde

Comment 2 Worker Ant 2019-07-01 14:18:06 UTC
REVIEW: https://review.gluster.org/22884 (core: use multiple servers while mounting a volume using ipv6) merged (#2) on master by Amar Tumballi


Note You need to log in before you can comment on or make changes to this bug.