Bug 764215 (GLUSTER-2483)

Summary: Showmount output is not consistent with exported volumes.
Product: [Community] GlusterFS Reporter: Gaurav <ggangalw>
Component: nfsAssignee: Gaurav <ggangalw>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.2CC: gluster-bugs, saurabh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: nfs
Documentation: DNR CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anand Avati 2011-03-03 04:58:21 UTC
PATCH: http://patches.gluster.com/patch/6322 in master (NFS : Check for duplicate entries while filling up child_up array.)

Comment 1 Shehjar Tikoo 2011-03-03 06:44:33 UTC
Assigning to Gaurav.

Gaurav, you can set this to resolved because the patch is now committed. Thanks.

Comment 2 Gaurav 2011-03-03 06:58:13 UTC
Output of showmount -e is not consistent with the actual exportlist of NFS.

gaurav@gaurav-Vostro-3400:~$ sudo gluster volume info

Volume Name: new_vol1
Type: Distribute
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: gaurav-Vostro-3400:/home/gaurav/v19
Brick2: gaurav-Vostro-3400:/home/gaurav/v20
Options Reconfigured:
nfs.enable-ino32: yes

Volume Name: new_vol
Type: Distributed-Replicate
Status: Started
Number of Bricks: 2 x 4 = 8
Transport-type: tcp
Bricks:
Brick1: gaurav-Vostro-3400:/home/gaurav/v11
Brick2: gaurav-Vostro-3400:/home/gaurav/v12
Brick3: gaurav-Vostro-3400:/home/gaurav/v13
Brick4: gaurav-Vostro-3400:/home/gaurav/v14
Brick5: gaurav-Vostro-3400:/home/gaurav/v15
Brick6: gaurav-Vostro-3400:/home/gaurav/v16
Brick7: gaurav-Vostro-3400:/home/gaurav/v17
Brick8: gaurav-Vostro-3400:/home/gaurav/v18
Options Reconfigured:
performance.stat-prefetch: yes
diagnostics.client-log-level: TRACE
diagnostics.brick-log-level: TRACE
nfs.enable-ino32: yes

gaurav@gaurav-Vostro-3400:~$ sudo showmount -e
Export list for gaurav-Vostro-3400:
/new_vol1 *


It happens when exportlist contains more than one entries.

Its a timing issue so doen't happen consistently.

The problem is with handling child_up event in NFS, there we maintain a array of started volumes for NFS, we fill that array in child_up event for each volume, but in case of parallel child_up events for same volume, this array could contain inconsistent data as checking and inserting operations are not atomic and we are also not checking for duplicate entries while inserting.

Comment 3 Saurabh 2011-03-08 09:48:04 UTC
I have tried out restarting glusterd several times, and the showmount -e has shown accurate result consistently,


[root@centos-qa-4 sbin]# showmount -e localhost
Export list for localhost:
/srj-dist *
/dist1    *
[root@centos-qa-4 sbin]# /etc/init.d/glusterd restart
Stopping glusterd:                                         [  OK  ]
Starting glusterd:                                         [  OK  ]
[root@centos-qa-4 sbin]# showmount -e localhost
Export list for localhost:
/srj-dist *
/dist1    *
[root@centos-qa-4 sbin]# /etc/init.d/glusterd restart
Stopping glusterd:                                         [  OK  ]
Starting glusterd:                                         [  OK  ]
[root@centos-qa-4 sbin]# showmount -e localhost
Export list for localhost:
/srj-dist *
/dist1    *
[root@centos-qa-4 sbin]#