summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-05-21 11:55:03 +0530
committerVenky Shankar <vshankar@redhat.com>2015-05-29 02:02:32 -0700
commit31d494d4f0a4bf7fa588efb57f8dc5e8788c7758 (patch)
tree2fac776b127c05d0fa4aaaa2bf27a8612f173adb /geo-replication
parentf6e72c45ad754073bc8269e954d236bab9e4a0e7 (diff)
geo-rep: Disable xattrs and acls support with tar_ssh
Geo-rep can't sync xattrs and acls with tar over ssh for following reasons. Issue 1: xattrs doesn't sync with tar over ssh. Reason: untar doesn't respect '--overwrite' option when used along with '--xattrs'. So it sends unlink if the file exists on destination and re-creates afresh. But all entry operations are banned in aux-gfid-mount as it may lead to gfid-mismatch. Hence fails with EPERM. This happens only when some xattr is set on a file in master volume. Issue2: acls on directories does not sync with tar over ssh. Reason: tar tries to opendir ".gfid/<gfid1>" and is not supported by gfid-access-translator as readirp can't be handled on virtual inodes and hence fails with ENOTSUP where as it syncs for files. Since the issue is with tar commmand it self and nothing could be done from gluster side, disabling xattr and acls support with tar over ssh option. Geo-rep can sync xattrs and acls with 'rsync' as the sync engine. BUG: 1223644 Change-Id: Ieba9e749ddbc41683b58ed8b1cc2ca50517fe58b Reviewed On: http://review.gluster.org/#/c/10873 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10899 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/master.py3
-rw-r--r--geo-replication/syncdaemon/resource.py4
2 files changed, 2 insertions, 5 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index ef79f02a52c..aedfc232b07 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -886,7 +886,8 @@ class GMasterChangelogMixin(GMasterCommon):
elif ec[1] == 'SETXATTR':
# To sync xattr/acls use rsync/tar, --xattrs and --acls
# switch to rsync and tar
- if boolify(gconf.sync_xattrs) or boolify(gconf.sync_acls):
+ if not boolify(gconf.use_tarssh) and \
+ (boolify(gconf.sync_xattrs) or boolify(gconf.sync_acls)):
datas.add(os.path.join(pfx, ec[0]))
else:
logging.warn('got invalid changelog type: %s' % (et))
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 71fcc8c798f..d5d8d02e05e 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -956,13 +956,9 @@ class SlaveRemote(object):
logging.debug("files: " + ", ".join(files))
(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)