Bug 1035218 - NFS_ACL : Inconsistent behaviour of setfacl and getfacl.
Summary: NFS_ACL : Inconsistent behaviour of setfacl and getfacl.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: ---
Assignee: santosh pradhan
QA Contact:
URL:
Whiteboard:
Depends On: 1030443
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-27 10:17 UTC by santosh pradhan
Modified: 2014-09-21 22:54 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.5.0
Clone Of: 1030443
Environment:
Last Closed: 2014-04-17 11:51:24 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description santosh pradhan 2013-11-27 10:17:58 UTC
+++ This bug was initially created as a clone of Bug #1030443 +++

Description of problem:

While trying to run setfacl and getfacl command NFS ACLs behaviour is inconsistent
.
Version-Release number of selected component (if applicable):
glusterfs 3.4.0.43.1u2rhs

How reproducible:

create user acltest_user2
create file dot
Mount the gluster as NFS
mount -t nfs -o acl,vers=3 10.70.36.231:dist-rep2 /mnt/acl2/

[root@rhsauto010 acl2]# touch dot
[root@rhsauto010 acl2]# setfacl -m u:acltest_user2:rwx dot
[root@rhsauto010 acl2]# getfacl dot
getfacl: dot: Invalid argument
[root@rhsauto010 acl2]# setfacl -m u:acltest_user2:rwx dot
setfacl: dot: Invalid argument


Actual results:

getfacl and setfacl behaviour is inconsistent.

Expected results:

getfacl and setfacl command should execute successfully. 

Additional info:


[root@rhsauto001 ~]# gluster vol info
 
Volume Name: dist-rep2
Type: Distributed-Replicate
Volume ID: 65a2f89e-7d92-4632-b10e-bfc7119a8f9a
Status: Started
Number of Bricks: 6 x 2 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.36.236:/rhs/brick1/d2r12
Brick2: 10.70.36.237:/rhs/brick1/d2r22
Brick3: 10.70.36.236:/rhs/brick1/d4r12
Brick4: 10.70.36.237:/rhs/brick1/d4r22
Brick5: 10.70.36.236:/rhs/brick1/d6r12
Brick6: 10.70.36.237:/rhs/brick1/d6r22
Brick7: 10.70.36.231:/rhs/brick1/d1r12
Brick8: 10.70.36.233:/rhs/brick1/d1r22
Brick9: 10.70.36.231:/rhs/brick1/d3r12
Brick10: 10.70.36.233:/rhs/brick1/d3r22
Brick11: 10.70.36.231:/rhs/brick1/d5r12
Brick12: 10.70.36.233:/rhs/brick1/d5r22
Options Reconfigured:
nfs.export-dir: /test(localhost)
nfs.export-volumes: on
nfs.acl: on


[root@rhsauto001 ~]# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    3   tcp  38465  mountd
    100005    1   tcp  38466  mountd
    100003    3   tcp   2049  nfs
    100024    1   udp  51728  status
    100024    1   tcp  52310  status
    100021    4   tcp  38468  nlockmgr
    100227    3   tcp   2049  nfs_acl
    100021    1   udp    735  nlockmgr
    100021    1   tcp    738  nlockmgr

--- Additional comment from RHEL Product and Program Management on 2013-11-14 08:08:35 EST ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Anil Shah on 2013-11-15 01:58:21 EST ---

logs uploaded at location
rhsqe-repo.lab.eng.blr.redhat.com:/home/repo/sosreports/1030443

--- Additional comment from Raghavendra Talur on 2013-11-18 07:09:38 EST ---

Hi Anil,

Can you re-run the test after this command and see if it still fails?
Command: gluster volume set <VOLNAME> stat-prefetch off

--- Additional comment from Anil Shah on 2013-11-18 07:28:03 EST ---


No luck.

[root@rhsauto001 ~]# gluster volume set dist-rep2 stat-prefetch off
volume set: success


[root@rhsauto010 acl2]# touch dot
[root@rhsauto010 acl2]# getfacl dot
# file: dot
# owner: root
# group: root
user::rw-
group::r--
other::r--

[root@rhsauto010 acl2]# setfacl -m u:adm:rw dot 
[root@rhsauto010 acl2]# getfacl dot
# file: dot
# owner: root
# group: root
user::rw-
user:adm:rw-
group::r--
mask::rw-
other::r--

[root@rhsauto010 acl2]# setfacl -m u:adm:rw dot
[root@rhsauto010 acl2]# getfacl dot
getfacl: dot: Invalid argument
[root@rhsauto010 acl2]# rm -rf dot
[root@rhsauto010 acl2]# touch dot
[root@rhsauto010 acl2]# setfacl -m u:acltest_user2:rwx dot
[root@rhsauto010 acl2]# getfacl dot
getfacl: dot: Invalid argument

--- Additional comment from santosh pradhan on 2013-11-21 05:53:43 EST ---


The pcap shows that the permissions fetched by getfacl are garbage or wrong. 

It needs refactoring of acl3_getacl_cbk() code.

Comment 1 Anand Avati 2013-11-27 10:24:14 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#1) for review on master by Santosh Pradhan (spradhan)

Comment 2 Anand Avati 2013-11-28 14:37:11 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#2) for review on master by Santosh Pradhan (spradhan)

Comment 3 Anand Avati 2013-11-28 14:45:53 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#3) for review on master by Santosh Pradhan (spradhan)

Comment 4 Anand Avati 2013-11-29 12:06:31 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#4) for review on master by Santosh Pradhan (spradhan)

Comment 5 Anand Avati 2013-11-30 04:47:05 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#5) for review on master by Santosh Pradhan (spradhan)

Comment 6 Anand Avati 2013-11-30 05:13:39 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#6) for review on master by Santosh Pradhan (spradhan)

Comment 7 Anand Avati 2013-12-03 08:28:21 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#7) for review on master by Santosh Pradhan (spradhan)

Comment 8 Anand Avati 2013-12-03 11:11:40 UTC
REVIEW: http://review.gluster.org/6368 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#8) for review on master by Santosh Pradhan (spradhan)

Comment 9 Anand Avati 2013-12-03 23:22:10 UTC
COMMIT: http://review.gluster.org/6368 committed in master by Anand Avati (avati) 
------
commit e4b9a74f46bca3894d686ce87042168c4304f07b
Author: Santosh Kumar Pradhan <spradhan>
Date:   Wed Nov 27 15:50:21 2013 +0530

    gNFS: Inconsistent behaviour of setfacl/getfacl
    
    The permissions returned by NFS ACL are wrong, which are rejected
    by NFS client as "Invalid argument". Refactor the NFS ACL code
    to return the proper permissions which would match with the
    requested permissions.
    
    Change-Id: I409a6600538a90f2c5c2e8d84657c3b508468fe6
    BUG: 1035218
    Signed-off-by: Santosh Kumar Pradhan <spradhan>
    Reviewed-on: http://review.gluster.org/6368
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 10 Anand Avati 2013-12-04 02:58:55 UTC
REVIEW: http://review.gluster.org/6418 (gNFS: Inconsistent behaviour of setfacl/getfacl) posted (#1) for review on release-3.5 by Santosh Pradhan (spradhan)

Comment 11 Anand Avati 2013-12-05 18:36:19 UTC
COMMIT: http://review.gluster.org/6418 committed in release-3.5 by Vijay Bellur (vbellur) 
------
commit 3c68dc35611f75a7d401f9b61d3b40cd6cc90968
Author: Santosh Kumar Pradhan <spradhan>
Date:   Wed Dec 4 08:25:07 2013 +0530

    gNFS: Inconsistent behaviour of setfacl/getfacl
    
    The permissions returned by NFS ACL are wrong, which are rejected
    by NFS client as "Invalid argument". Refactor the NFS ACL code
    to return the proper permissions which would match with the
    requested permissions.
    
    Upstream master review: http://review.gluster.org/6368
    
    Change-Id: Ieb079b5da98b061291b44655e18a1dee92a8e463
    BUG: 1035218
    Signed-off-by: Santosh Kumar Pradhan <spradhan>
    Reviewed-on: http://review.gluster.org/6418
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 12 Niels de Vos 2014-04-17 11:51:24 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.