Bug 1248510 - Gluster NFS: showmount -e command doesn't display properly (overlap) if a directory is exported to more than one client
Summary: Gluster NFS: showmount -e command doesn't display properly (overlap) if a dir...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gluster-nfs
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Niels de Vos
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-30 12:33 UTC by Nag Pavan Chilakam
Modified: 2018-04-16 17:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-16 17:59:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Nag Pavan Chilakam 2015-07-30 12:33:23 UTC
Description of problem:
======================
if you export a specific directory to more than one client using nfs.access-dir, then the showmount doesnt display all the IPs as there are some overlaps happening and this is not very readable

eg: in the below volume i have exported dir1 to 10.70.42.47 and 10.70.42.50
[root@dhcp42-196 ~]# gluster v info
 
Volume Name: testvol1
Type: Distributed-Replicate
Volume ID: 4bb66bbd-de5c-49ff-8d88-aa63681c1b20
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.43.133:/rhs/brick1/testvol1
Brick2: 10.70.42.196:/rhs/brick1/testvol1
Brick3: 10.70.43.133:/rhs/brick1/2estvol1
Brick4: 10.70.42.196:/rhs/brick2/testvol1
Options Reconfigured:
nfs.addr-namelookup: off
nfs.export-volumes: on
nfs.export-dir: /dir.x(10.70.34.39),/dir.y,/dir1(10.70.42.47,10.70.42.50)

But on checking showmount it shows as below:
[root@rhgs-6 mnt]# showmount -e 10.70.43.133
Export list for 10.70.43.133:
/testvol1/dir.x             *
/testvol1/dir.y             *
/testvol1/dir1              *
/testvol110.70.42.50)       *

it can be seen that the IPs of clients are not displayed properly

Version-Release number of selected component (if applicable):
============================================================
[root@dhcp42-196 ~]# rpm -qa|grep gluster
glusterfs-api-3.7.1-11.el7rhgs.x86_64
glusterfs-cli-3.7.1-11.el7rhgs.x86_64
vdsm-gluster-4.16.20-1.2.el7rhgs.noarch
gluster-nagios-addons-0.2.4-4.el7rhgs.x86_64
glusterfs-libs-3.7.1-11.el7rhgs.x86_64
glusterfs-client-xlators-3.7.1-11.el7rhgs.x86_64
glusterfs-server-3.7.1-11.el7rhgs.x86_64
glusterfs-rdma-3.7.1-11.el7rhgs.x86_64
gluster-nagios-common-0.2.0-2.el7rhgs.noarch
glusterfs-3.7.1-11.el7rhgs.x86_64
glusterfs-fuse-3.7.1-11.el7rhgs.x86_64
glusterfs-geo-replication-3.7.1-11.el7rhgs.x86_64
[root@dhcp42-196 ~]# rpm -qa|grep nfs
nfs-utils-1.3.0-0.8.el7.x86_64
libnfsidmap-0.25-11.el7.x86_64


Client side:
[root@rhgs-6 mnt]# rpm -qa|grep nfs
nfs-utils-lib-1.1.5-11.el6.x86_64
nfs-utils-1.2.3-64.el6.x86_64



Steps to Reproduce::
=================
1)Create a volume say testvol1 and start it
2)mount the volume using fuse or nfs and create a directory say dir1 and dirtest
3)Turn off nfs.export-dirs which is on by default(note that this is nfs.export-dirS and not nfs.export-dir)
3)Now set nfs.export-dir to export the dir to a atleast two specific IPs as below:
gluster v set <volname> nfs.export-dir '/dirtest,/dir1(10.70.42.47,10.70.42.50)
)'
This means the directory dir1 created under the parent volume is exported and mountable only on clients 10.70.42.47 and 10.70.42.50whereas /dirtest will be mountable on any client
4)Now issue a showmount -e <gluster server IP> on any client.
It will show as below

But on checking showmount it shows as below:
[root@rhgs-6 mnt]# showmount -e 10.70.43.133
Export list for 10.70.43.133:
/testvol1/dir.x             *
/testvol1/dir.y             *
/testvol1/dir1              *
/testvol110.70.42.50)       *
This lists the exported volumes and sub-directories of the server.


Expected results:
==================
It should show as below
[root@rhgs-6 mnt]# showmount -e 10.70.43.133
Export list for 10.70.43.133:
/testvol1/dir.x             *
/testvol1/dir.y             *
/testvol1/dir1             10.70.42.47,10.70.42.50
/testvol1                   *


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