summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-03-25 23:39:16 +0530
committerVenky Shankar <vshankar@redhat.com>2015-03-30 06:57:16 -0700
commit624938999bf925af710e9f73c75040416f68b756 (patch)
tree8581ab7d9e49d068cf2306d7bb454df3a24305dd /geo-replication/syncdaemon/resource.py
parent86fa9298ea9d04766c0a693192e6660ad4b02165 (diff)
geo-rep: Add support for acls
This patch adds support for ACLS. When it sees SETXATTR in Changelog, it adds the file to data queue. rsync/tar+ssh will take care of syncing ACLS. User set ACLS will be synced to Slave. This requires "system.posix_acl_access" to go through when client-pid is equal GF_CLIENT_PID_GSYNCD in fuse layer. New config interface is introduced, sync-acls Which can be set using geo-rep config(Default is True) gluster volume geo-replication <VOLUME> <SLAVEHOST>::<SLAVEVOL> \ config sync-acls false Change-Id: I7eb3523fa72b8fed830efc98138891244e830d65 BUG: 1187021 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10001 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r--geo-replication/syncdaemon/resource.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 10c6406e283..a1281012264 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -831,6 +831,7 @@ class SlaveRemote(object):
'--stats', '--numeric-ids', '--no-implied-dirs'] + \
gconf.rsync_options.split() + \
(boolify(gconf.sync_xattrs) and ['--xattrs'] or []) + \
+ (boolify(gconf.sync_acls) and ['--acls'] or []) + \
['.'] + list(args)
po = Popen(argv, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
for f in files:
@@ -854,10 +855,12 @@ class SlaveRemote(object):
(host, rdir) = slaveurl.split(':')
tar_cmd = ["tar"] + \
(boolify(gconf.sync_xattrs) and ['--xattrs'] or []) + \
+ (boolify(gconf.sync_acls) and ['--acls'] or []) + \
["-cf", "-", "--files-from", "-"]
ssh_cmd = gconf.ssh_command_tar.split() + \
[host, "tar"] + \
(boolify(gconf.sync_xattrs) and ['--xattrs'] or []) + \
+ (boolify(gconf.sync_acls) and ['--acls'] or []) + \
["--overwrite", "-xf", "-", "-C", rdir]
p0 = Popen(tar_cmd, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.PIPE)