Bug #23284
openLibrgw rename operation returns operation not permitted
0%
Description
Hi,
Hi, I found the following test can't pass in NFS-Ganesha with NFS3 over RGW:
client side mount option : mount -t nfs xx.xx.xx.xx:/ /mnt -o vers=3,sync,nolock
Once sharing filesystem is successfully mounted, I executed:
/mnt/bucket1 $ touch test_obj
/mnt/bucket1 $ mv test_obj test_obj_new
And I got : Operation not permitted -1
I traced the code in Ceph side and I found that the 'mv' operation tried to rename the opening object 'test_obj', which should have been closed, then librgw return error code EPRM.
Unlike to filesystem(FSAL VFS), inode doesn't exist in Object store, name is the key to the object, so we should make sure the target object is closed before rename operation.
As NFS v3 is stateless, there is no 'close' request send from nfs client side, so the nfs server has to handle such situation itself.