gluster / glusterfs

Gluster Filesystem : Build your distributed storage in minutes
https://www.gluster.org
GNU General Public License v2.0
4.74k stars 1.08k forks source link

[bug:1730565] Geo-replication does not sync default ACL #959

Closed gluster-ant closed 10 months ago

gluster-ant commented 4 years ago

URL: https://bugzilla.redhat.com/1730565 Creator: homma at allworks.co.jp Time: 20190717T07:08:12

Description of problem: Default ACLs are not synced to geo-replication slave.

Version-Release number of selected component (if applicable):

How reproducible: Always

Steps to Reproduce:

  1. On geo-rep master: mkdir dir1 setfacl -d -m g::rwx dir1 getfacl dir1

  2. On geo-rep slave: getfacl dir1

Actual results: Default ACL is not set on slave.

Expected results: Default ACL is set on slave.

Additional info: Access ACLs are synced as expected.

With slave-gluster-log-level=DEBUG, the following log messages appears.

[2019-07-17 03:49:00.305670] D [fuse-helpers.c:649:fuse_ignore_xattr_set] 0-glusterfs-fuse: disallowing setxattr: key [system.posix_acl_default], client pid [-1] [2019-07-17 03:49:00.308140] D [fuse-helpers.c:649:fuse_ignore_xattr_set] 0-glusterfs-fuse: disallowing setxattr: key [trusted.SGI_ACL_DEFAULT], client pid [-1]

On the other hand, for access ACL,

[2019-07-17 06:11:27.892153] D [fuse-helpers.c:649:fuse_ignore_xattr_set] 0-glusterfs-fuse: allowing setxattr: key [system.posix_acl_access], client pid [-1]

In fuse_ignore_xattr_set(), only the following xattrs are allowed to be set by gsyncd:

/* trusted NS check */
if (!((fnmatch("*.glusterfs.*.xtime", key, FNM_PERIOD) == 0) ||
      (fnmatch("*.glusterfs.volume-mark", key, FNM_PERIOD) == 0) ||
      (fnmatch("*.glusterfs.volume-mark.*", key, FNM_PERIOD) == 0) ||
      (fnmatch("system.posix_acl_access", key, FNM_PERIOD) == 0) ||
      (fnmatch("glusterfs.gfid.newfile", key, FNM_PERIOD) == 0) ||
      (fnmatch("*.glusterfs.shard.block-size", key, FNM_PERIOD) == 0) ||
      (fnmatch("*.glusterfs.shard.file-size", key, FNM_PERIOD) == 0)))
    ret = -1;

out: gf_log("glusterfs-fuse", GF_LOG_DEBUG, "%s setxattr: key [%s], " " client pid [%d]", (ret ? "disallowing" : "allowing"), key, priv->client_pid);

Also, on hybrid crawl, only MKDIR and SETATTR changelog records are genereated for directories. I think SETXATTR records should also be generated.

stale[bot] commented 4 years ago

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[bot] commented 4 years ago

Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.