diff options
author | nik-redhat <nladha@redhat.com> | 2020-07-30 13:04:52 +0530 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-08-18 04:08:45 +0000 |
commit | b86d95dfa3ba8f08dc2ef8c6e6b0dcd5ea4314b7 (patch) | |
tree | 8c80483b74c81d1528a517ae5a6838801dba2938 /extras | |
parent | 9978ceb26327de9545c6e0a4f9230b401e629793 (diff) | |
download | glusterfs-b86d95dfa3ba8f08dc2ef8c6e6b0dcd5ea4314b7.tar.gz glusterfs-b86d95dfa3ba8f08dc2ef8c6e6b0dcd5ea4314b7.tar.xz glusterfs-b86d95dfa3ba8f08dc2ef8c6e6b0dcd5ea4314b7.zip |
glusterd: shared storage mount fails in ipv6 environment
Issue:
In case of ipv6 environment, the mounting of glusterd_shared_storage
volume fails as it doesn't recognises the ipv6 enviornment.
Fix:
In case of ipv6 environment, the address-family is passed
to the hooks script on creating shared-storage, then depending
upon the address-family --xlator-option=transport.address-family=inet6
option is added to the mount command, and the mounting succeeds.
Fixes: #1406
Change-Id: Ib1888c34d85e6c01618b0ba214cbe1f57576908d
Signed-off-by: nik-redhat <nladha@redhat.com>
Diffstat (limited to 'extras')
-rwxr-xr-x | extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh index 885ed03ad5..5a8c6c1f63 100755 --- a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh +++ b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh @@ -104,8 +104,15 @@ function check_volume_status() echo $status } -mount_cmd="mount -t glusterfs $local_node_hostname:/gluster_shared_storage \ +key=`echo $5 | cut -d '=' -f 1` +val=`echo $5 | cut -d '=' -f 2` +if [ "$key" == "transport.address-family" ]; then + mount_cmd="mount -t glusterfs -o xlator-option=transport.address-family=inet6 \ + $local_node_hostname:/gluster_shared_storage /var/run/gluster/shared_storage" +else + mount_cmd="mount -t glusterfs $local_node_hostname:/gluster_shared_storage \ /var/run/gluster/shared_storage" +fi if [ "$option" == "enable" ]; then retry=0; |