Bug 1009210 - Incorrect NFS ACL encoding causes "system.posix_acl_default" setxattr failure on bricks
Summary: Incorrect NFS ACL encoding causes "system.posix_acl_default" setxattr failure...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: santosh pradhan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1020181
TreeView+ depends on / blocked
 
Reported: 2013-09-18 01:49 UTC by rwareing
Modified: 2014-09-21 22:54 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.5.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1020181 (view as bug list)
Environment:
Last Closed: 2014-04-17 11:48:12 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Patch to fix NFS ACL encoding failures. (2.52 KB, patch)
2013-09-18 01:53 UTC, rwareing
no flags Details | Diff
Screen shot of what an NFS v3 ACL looks like on the wire. (73.34 KB, image/png)
2013-09-25 02:38 UTC, rwareing
no flags Details

Description rwareing 2013-09-18 01:49:29 UTC
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.

Comment 1 rwareing 2013-09-18 01:53:43 UTC
Created attachment 799050 [details]
Patch to fix NFS ACL encoding failures.

Patch with correctly encodes ACLs.

Comment 3 Anand Avati 2013-09-20 10:53:15 UTC
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#1) for review on master by Santosh Pradhan (spradhan)

Comment 4 Anand Avati 2013-09-20 11:35:25 UTC
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#2) for review on master by Santosh Pradhan (spradhan)

Comment 5 rwareing 2013-09-25 02:38:46 UTC
Created attachment 802534 [details]
Screen shot of what an NFS v3 ACL looks like on the wire.

Comment 6 Anand Avati 2013-09-26 15:22:52 UTC
REVIEW: http://review.gluster.org/6008 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#1) for review on master by Santosh Pradhan (spradhan)

Comment 7 Anand Avati 2013-09-26 15:24:23 UTC
REVIEW: http://review.gluster.org/6008 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#2) for review on master by Santosh Pradhan (spradhan)

Comment 8 Anand Avati 2013-09-27 12:09:16 UTC
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#3) for review on master by Santosh Pradhan (spradhan)

Comment 9 Anand Avati 2013-09-27 12:12:25 UTC
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#4) for review on master by Santosh Pradhan (spradhan)

Comment 10 Anand Avati 2013-09-27 19:48:45 UTC
REVIEW: http://review.gluster.org/5980 (gNFS: Incorrect NFS ACL encoding for XFS) posted (#5) for review on master by Santosh Pradhan (spradhan)

Comment 11 Anand Avati 2013-09-29 23:55:23 UTC
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>

Comment 12 Anand Avati 2013-09-30 22:35:09 UTC
REVIEW: http://review.gluster.org/6015 (libglusterfs: add glusterfs-acl.h to Makefile.am) posted (#1) for review on master by Anand Avati (avati)

Comment 13 Anand Avati 2013-10-01 02:04:10 UTC
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>

Comment 15 Anand Avati 2013-10-21 16:10:34 UTC
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)

Comment 16 Anand Avati 2013-10-22 06:30:53 UTC
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)

Comment 17 Anand Avati 2013-10-22 06:58:56 UTC
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>

Comment 18 Niels de Vos 2014-04-17 11:48:12 UTC
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


Note You need to log in before you can comment on or make changes to this bug.