Bug 1242148

Summary: With NFSv4 ACLs enabled, rename of a file/dir to an existing file/dir fails
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Soumya Koduri <skoduri>
Component: nfs-ganeshaAssignee: Jiffin <jthottan>
Status: CLOSED ERRATA QA Contact: Matt Zywusko <mzywusko>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: asriram, asrivast, bmohanra, byarlaga, jthottan, kkeithle, mzywusko, ndevos, nlevinki, sankarshan, skoduri
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: nfs-ganesha-2.2.0-10 Doc Type: Bug Fix
Doc Text:
Previously, when ACLs were enabled, rename of file to an existing file threw an error on nfs4 mount. Due to this, rename threw a remote I/O error, although the operation was successful and it might take few seconds for completing the operation. With this fix, ENOENT error is returned on nfs4_getfacl, if the file is missing on the mount. Rename will now succeed without throwing any error.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-01 05:29:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1188184, 1216951, 1256227, 1260783, 1262191    
Deadline: 2015-08-28   

Description Soumya Koduri 2015-07-11 16:33:42 UTC
Description of problem:

If NFSv4 ACLs are enabled, rename of a file to an existing file fails with NFS4ERR_SERVERFAULT error. 

Same is the case with directories if in case the source directory is not empty.

This results in below two pynfs failures if ACLs are enabled for that export -
RNM13    st_rename.testDirToDir                                   : RUNNING
RNM13    st_rename.testDirToDir                                   : FAILURE
           RENAME dir1 into existing, empty dir2 should return
           NFS4_OK, instead got NFS4ERR_SERVERFAULT
RNM15    st_rename.testFileToFile                                 : RUNNING
RNM15    st_rename.testFileToFile                                 : FAILURE
           RENAME file1 into existing file2 should return
           NFS4_OK, instead got NFS4ERR_SERVERFAULT


How reproducible:
always

Steps to Reproduce:
1. On NFSv4 mount, create two files (say file1, file2)
2. Now try to rename file1 to file2.


Actual results:
Rename fails with NFS4ERR_SERVERFAULT

Expected results:
The operation should succeed and return NFS4_OK.

Comment 4 Soumya Koduri 2015-07-20 13:11:25 UTC
This issue is seen even with latest nfs-ganesha package available (nfs-ganesha-2.2.0-5)

Comment 5 monti lawrence 2015-07-22 21:24:32 UTC
Doc text is edited. Please sign off to be included in Known Issues.

Comment 6 Jiffin 2015-07-23 07:11:42 UTC
Verified the doc text

Comment 7 Jiffin 2015-07-23 11:04:10 UTC
fix is posted in upstream https://review.gerrithub.io/#/c/240757/

Comment 15 Jiffin 2015-09-09 08:34:10 UTC
The patch merged in upstream ganesha https://review.gerrithub.io/#/c/240757/

Comment 17 Saurabh 2015-11-03 14:21:02 UTC
[root@]# mv file1 file2
mv: overwrite `file2'? y
[root@]# ls -l
total 0
-rw-r--r--. 1 root root 0 Nov  4  2015 file2


verified on nfs-ganesha-2.2.0-10.el7rhgs.x86_64

Comment 20 errata-xmlrpc 2016-03-01 05:29:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0193.html