Description of problem: When using NFS ACLs on XFS (perhaps other FS's) incorrect encoding causes lsetxattr failures on the bricks (visible by GDB or strace -e lsetxattr,setxattr -p <brick pid>). This is effectively a silent failure if NFS attribute caching is used. Version-Release number of selected component (if applicable): v3.3.x, v3.4.x How reproducible: 100% Steps to Reproduce: 1. Create volume 2. Mount volume via NFS w/ attribute caching _off_ (mount -overs=3,acl,noac localhost:/<volume> <mount point>) 3. setfacl -m d:root:rw testdir 4. getfacl testdir ...no attribute will be visible because is silently failed on the backend. Actual results: No default ACL is seen. Expected results: Default ACL should been seen via getfacl. Additional info: Fix available.
Created attachment 799050 [details] Patch to fix NFS ACL encoding failures. Patch with correctly encodes ACLs.
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#1) for review on master by Santosh Pradhan (spradhan)
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#2) for review on master by Santosh Pradhan (spradhan)
Created attachment 802534 [details] Screen shot of what an NFS v3 ACL looks like on the wire.
REVIEW: http://review.gluster.org/6008 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#1) for review on master by Santosh Pradhan (spradhan)
REVIEW: http://review.gluster.org/6008 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#2) for review on master by Santosh Pradhan (spradhan)
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#3) for review on master by Santosh Pradhan (spradhan)
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#4) for review on master by Santosh Pradhan (spradhan)
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#5) for review on master by Santosh Pradhan (spradhan)
COMMIT: http://review.gluster.org/5980 committed in master by Anand Avati (avati) ------ commit e9554f7792d893f0ea8afe368829f9944ef52bdf Author: Santosh Kumar Pradhan <spradhan> Date: Thu Sep 19 12:01:38 2013 +0530 gNFS: Incorrect NFS ACL encoding for XFS Problem: Incorrect NFS ACL encoding causes "system.posix_acl_default" setxattr failure on bricks on XFS file system. XFS (potentially others?) doesn't understand when the 0x10 prefix is added to the ACL type field for default ACLs (which the Linux NFS client adds) which causes setfacl()->setxattr() to fail silently. NFS client adds NFS_ACL_DEFAULT(0x1000) for default ACL. FIX: Mask the prefix (added by NFS client) OFF, so the setfacl is not rejected when it hits the FS. Original patch by: "Richard Wareing" Change-Id: I17ad27d84f030cdea8396eb667ee031f0d41b396 BUG: 1009210 Signed-off-by: Santosh Kumar Pradhan <spradhan> Reviewed-on: http://review.gluster.org/5980 Reviewed-by: Amar Tumballi <amarts> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Anand Avati <avati>
REVIEW: http://review.gluster.org/6015 (libglusterfs: add glusterfs-acl.h to Makefile.am) posted (#1) for review on master by Anand Avati (avati)
COMMIT: http://review.gluster.org/6015 committed in master by Anand Avati (avati) ------ commit dbe4566beff3239bbb23af50b1ef263b8b100e1b Author: Anand Avati <avati> Date: Fri Sep 27 10:21:22 2013 -0700 libglusterfs: add glusterfs-acl.h to Makefile.am Without this, glusterfs-acl.h is left out of 'make dist' and building RPM fails. Change-Id: I5dc9dc8eecdea4c4c0d06f0b3da23bd2df4e944e Signed-off-by: Anand Avati <avati> BUG: 1009210 Reviewed-on: http://review.gluster.org/6015 Reviewed-by: Kaleb KEITHLEY <kkeithle> Tested-by: Gluster Build System <jenkins.com>
REVIEW: http://review.gluster.org/6117 (Rectify the guard macro name of glusterfs-acl.h) posted (#1) for review on master by Santosh Pradhan (spradhan)
REVIEW: http://review.gluster.org/6117 (Rectify the guard macro name of glusterfs-acl.h) posted (#2) for review on master by Santosh Pradhan (spradhan)
COMMIT: http://review.gluster.org/6117 committed in master by Anand Avati (avati) ------ commit e6bf83dbf781877d185057b3339ed81d7ec150e6 Author: Santosh Kumar Pradhan <spradhan> Date: Mon Oct 21 21:36:13 2013 +0530 Rectify the guard macro name of glusterfs-acl.h Change-Id: I13bc7626c7f852647a75e3d5e397d2cd55757932 BUG: 1009210 Signed-off-by: Santosh Kumar Pradhan <spradhan> Reviewed-on: http://review.gluster.org/6117 Reviewed-by: Anand Avati <avati> Tested-by: Anand Avati <avati>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.0, please reopen this bug report. glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user