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.
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.
[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
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
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.