Bug 804301

Summary: NFS: Applications try to connect to a wrong volume
Product: [Community] GlusterFS Reporter: Sachidananda Urs <sac>
Component: nfsAssignee: Vivek Agarwal <vagarwal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: gluster-bugs, sankarshan, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 13:11:45 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Sachidananda Urs 2012-03-17 10:22:23 EDT
* Create a volume and NFS mount. Run some tests that run long enough.
* Stop the volume, mount point becomes stale and applications block.
* Create a new volume and start it.
* The blocked applications try to connect to the new volume and the following logs are seen (in abundance amounting to GB of logs):


[2012-03-17 04:00:47.978478] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Stale nfs client 10.16.156.6:784 must be trying to connect to a deleted volume, please unmount it.
[2012-03-17 04:00:47.978487] W [nfs3-helpers.c:3389:nfs3_log_common_res] 0-nfs-nfsv3: XID: 94d7fbb9, ACCESS: NFS: 70(Invalid file handle), POSIX: 14(Bad address)
[2012-03-17 04:00:47.978520] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Failed to map FH to vol: client=10.16.156.6:784, exportid=ec7c3ed3-b828-401f-9cfe-28d29b94c1a7, gfid=f6f73d
7b-e0d7-466f-ae22-926fe873f863
[2012-03-17 04:00:47.978532] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Stale nfs client 10.16.156.6:784 must be trying to connect to a deleted volume, please unmount it.
[2012-03-17 04:00:47.978541] W [nfs3-helpers.c:3389:nfs3_log_common_res] 0-nfs-nfsv3: XID: 95d7fbb9, ACCESS: NFS: 70(Invalid file handle), POSIX: 14(Bad address)
[2012-03-17 04:00:47.978869] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Failed to map FH to vol: client=10.16.156.6:784, exportid=ec7c3ed3-b828-401f-9cfe-28d29b94c1a7, gfid=f6f73d
7b-e0d7-466f-ae22-926fe873f863
[2012-03-17 04:00:47.978892] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Stale nfs client 10.16.156.6:784 must be trying to connect to a deleted volume, please unmount it.
[2012-03-17 04:00:47.978909] W [nfs3-helpers.c:3389:nfs3_log_common_res] 0-nfs-nfsv3: XID: 96d7fbb9, ACCESS: NFS: 70(Invalid file handle), POSIX: 14(Bad address)
[2012-03-17 04:00:47.978965] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Failed to map FH to vol: client=10.16.156.6:784, exportid=ec7c3ed3-b828-401f-9cfe-28d29b94c1a7, gfid=f6f73d
7b-e0d7-466f-ae22-926fe873f863
[2012-03-17 04:00:47.978976] E [nfs3.c:1549:nfs3_access] 0-nfs-nfsv3: Stale nfs client 10.16.156.6:784 must be trying to connect to a deleted volume, please unmount it.
[2012-03-17 04:00:47.978985] W [nfs3-helpers.c:3389:nfs3_log_common_res] 0-nfs-nfsv3: XID: 97d7fbb9, ACCESS: NFS: 70(Invalid file handle), POSIX: 14(Bad address)


The client reports:
Stale NFS File Handle.
Comment 1 Krishna Srinivas 2012-03-19 03:24:14 EDT
Need to make gnfs log this occasionally.
Comment 2 Krishna Srinivas 2012-04-03 04:01:18 EDT
*** Bug 803180 has been marked as a duplicate of this bug. ***
Comment 3 Anand Avati 2013-06-17 07:00:52 EDT
REVIEW: http://review.gluster.org/5229 (nfs: log stale mount errors occasionally) posted (#1) for review on master by Rajesh Amaravathi (rajesh@redhat.com)
Comment 4 Anand Avati 2013-06-18 23:28:39 EDT
COMMIT: http://review.gluster.org/5229 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit bda60de187aadc885bbc705ccb9317f680f4b9d3
Author: Rajesh Amaravathi <rajesh@redhat.com>
Date:   Mon Jun 17 16:28:17 2013 +0530

    nfs: log stale mount errors occasionally
    
    log the state mount errors only occasionally so
    as not to fill log file with too many of them.
    
    Change-Id: Ib5a2485dc2ce3a181cff34bbb6d7aba17a2e4d4d
    BUG: 804301
    Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
    Reviewed-on: http://review.gluster.org/5229
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>