Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getfattr returns ENOATTR for system.posix_acl_access on disperse type volumes #1140

Closed
anoopcs9 opened this issue Mar 30, 2020 · 11 comments
Closed
Assignees
Labels

Comments

@anoopcs9
Copy link
Contributor

Description of problem:
Running getfattr on FUSE mount of a disperse volume returns ENOATTR for explicitly set ACLs for any user:

# getfattr -d -m . /mnt/glusterfs/patchy/

getfattr: Removing leading '/' from absolute path names
# file: mnt/glusterfs/patchy/
security.selinux="system_u:object_r:fusefs_t:s0"
/mnt/glusterfs/patchy/: system.posix_acl_access: No such attribute
trusted.SGI_ACL_FILE=0sAAAABQAAAAH/////AAcAAAAAAAIAAAPoAAcAAAAAAAT/////
AAUAAAAAABD/////AAcAAAAAACD/////AAUAAA==

The exact command to reproduce the issue:
getfattr -d -m . <FUSE-mount-point-with-ACLs-set>

The full output of the command that failed:

# getfattr -d -m . /mnt/glusterfs/patchy/

getfattr: Removing leading '/' from absolute path names
# file: mnt/glusterfs/patchy/
security.selinux="system_u:object_r:fusefs_t:s0"
/mnt/glusterfs/patchy/: system.posix_acl_access: No such attribute
trusted.SGI_ACL_FILE=0sAAAABQAAAAH/////AAcAAAAAAAIAAAPoAAcAAAAAAAT/////
AAUAAAAAABD/////AAcAAAAAACD/////AAUAAA==

Expected results:
# getfattr -d -m . /mnt/glusterfs/patchy/

getfattr: Removing leading '/' from absolute path names
# file: mnt/glusterfs/vol/
security.selinux="system_u:object_r:fusefs_t:s0"
system.posix_acl_access=0sAgAAAAEABwD/////AgAHAOgDAAAEAAUA/////xAABwD//
///IAAFAP////8=
trusted.SGI_ACL_FILE=0sAAAABQAAAAH/////AAcAAAAAAAIAAAPoAAcAAAAAAAT/////
AAUAAAAAABD/////AAcAAAAAACD/////AAUAAA==

Additional info:
# getfacl /mnt/glusterfs/patchy/

getfacl: Removing leading '/' from absolute path names
# file: mnt/glusterfs/patchy/
# owner: root
\# group: root
user::rwx
user:anoopcs:rwx
group::r-x
mask::rwx
other::r-x

Explicit query for "system.posix_acl_access" returned success:
# getfattr -d -m . -n system.posix_acl_access /mnt/glusterfs/patchy/

getfattr: Removing leading '/' from absolute path names
# file: mnt/glusterfs/patchy/
system.posix_acl_access=0sAgAAAAEABwD/////AgAHAOgDAAAEAAUA/////xAABwD//
///IAAFAP////8=

TRACE log snippet:

[2020-03-27 13:24:18.829566] T [MSGID: 0] [md-cache.c:859:mdc_inode_xatt_get] 0-md-cache: xattr not present (00000000-0000-0000-0000-000000000001)
[2020-03-27 13:24:18.829650] D [MSGID: 0] [md-cache.c:2437:mdc_getxattr] 0-stack-trace: stack-address: 0x7f6230001de8, patchy-md-cache returned -1 error: No data available [No data available]
[2020-03-27 13:24:18.829712] D [MSGID: 0] [defaults.c:1454:default_getxattr_cbk] 0-stack-trace: stack-address: 0x7f6230001de8, patchy-io-threads returned -1 error: No data available [No data available]
[2020-03-27 13:24:18.829751] D [MSGID: 0] [io-stats.c:2373:io_stats_getxattr_cbk] 0-stack-trace: stack-address: 0x7f6230001de8, patchy returned -1 error: No data available [No data available]
[2020-03-27 13:24:18.829864] D [MSGID: 0] [posix-acl.c:2133:posix_acl_getxattr_cbk] 0-stack-trace: stack-address: 0x7f6230001de8, posix-acl-autoload returned -1 error: No data available [No data available]
[2020-03-27 13:24:18.829904] D [fuse-bridge.c:4260:fuse_xattr_cbk] 0-glusterfs-fuse: 246: GETXATTR(system.posix_acl_access) / => -1 (No data available)

- The output of the gluster volume info command:

Volume Name: patchy
Type: Distributed-Disperse
Volume ID: 5e56f9d9-282c-43b8-bd3e-59290f4f0a34
Status: Started
Snapshot Count: 0
Number of Bricks: 2 x (2 + 1) = 6
Transport-type: tcp
Bricks:
Brick1: 10.0.0.1:/bricks/brick2
Brick2: 10.0.0.2:/bricks/brick3
Brick3: 10.0.0.1:/bricks/brick4
Brick4: 10.0.0.2:/bricks/brick5
Brick5: 10.0.0.1:/bricks/brick6
Brick6: 10.0.0.2:/bricks/brick7
Options Reconfigured:
storage.fips-mode-rchecksum: on
nfs.disable: on

- The operating system / glusterfs version:
GlusterFS master on Fedora 31

@anoopcs9
Copy link
Contributor Author

Note: Issue is not seen with Distribute-Replicate volume

@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24267 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24267 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@xhernandez xhernandez added release 7 release-6 Use this label for the release 6 backports labels Apr 17, 2020
@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24342 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24343 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@xhernandez xhernandez reopened this Apr 17, 2020
@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24343 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24342 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24343 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

@gluster-ant
Copy link
Collaborator

A patch https://review.gluster.org/24342 has been posted that references this issue.

md-cache: avoid clearing cache when not necessary

mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez xhernandez@redhat.com

gluster-ant pushed a commit that referenced this issue Apr 21, 2020
mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
gluster-ant pushed a commit that referenced this issue May 9, 2020
mdc_inode_xatt_set() blindly cleared current cache when dict was not
NULL, even if there was no xattr requested.

This patch fixes this by only calling mdc_inode_xatt_set() when we have
explicitly requested something to cache.

Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d
Fixes: #1140
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
@stale
Copy link

stale bot commented Nov 16, 2020

Thank you for your contributions.
Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity.
It will be closed in 2 weeks if no one responds with a comment here.

@stale stale bot added the wontfix Managed by stale[bot] label Nov 16, 2020
@xhernandez xhernandez removed the wontfix Managed by stale[bot] label Nov 17, 2020
@xhernandez
Copy link
Contributor

The patches have already been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants