+++ This bug was initially created as a clone of Bug #1223642 +++ +++ This bug was initially created as a clone of Bug #1222776 +++ Description of problem: ======================= When we are using sync option as tarssh "use-tarssh true". Whenever the file is created at master volume, the respective entry gets created at the slave but the actual sync doesn't happen. At master volume: ================= [root@wingo master]# pwd /mnt/master [root@wingo master]# ls hosts hosts.allow [root@wingo master]# cat * 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # # hosts.allow This file contains access rules which are used to # allow or deny connections to network services that # either use the tcp_wrappers library or that have been # started through a tcp_wrappers-enabled xinetd. # # See 'man 5 hosts_options' and 'man 5 hosts_access' # for information on rule syntax. # See 'man tcpd' for information on tcp_wrappers # [root@wingo master]# At slave volume: ================ [root@wingo slave]# pwd /mnt/slave [root@wingo slave]# ls hosts hosts.allow [root@wingo slave]# cat * [root@wingo slave]# cat hosts [root@wingo slave]# cat hosts.allow [root@wingo slave]# Version-Release number of selected component (if applicable): ============================================================= How reproducible: ================= Always Steps to Reproduce: =================== 1. Create a master cluster 2. Create and Start the master volume 3. Create a slave cluster 4. Create ans Start the slave volume 5. Create and start gluster_shared_storage volume 6. Mount gluster_shared_storage at /var/run/gluster/shared_storage on all the master nodes participating in master volume. 7. Create the geo-rep session 8. Set the config option use_meta_volume to true 9. Set the config option use_tarssh to true 10. Start the geo-rep session 11. Mount the master volume to client and create a file 12. Mount the slave volume 13. Check the files on master and slave volume Actual results: =============== Files that are in master gets created at slave with no content. (The first phase of creation the entry is successful but the actual sync doesn't happen) Expected results: ================= The files should actually sync. --- Additional comment from Kotresh HR on 2015-05-21 02:14:12 EDT --- The issue is with recent enhancement to sync extended attributes in geo-replication. The --overwrite option being usind with tar command is not in effect when --xattrs option of tar command is used to sync xattrs. The consequence being if file exists on destination, it does not overwrite, it tries to unlink (which fails in gfid-access translator as entries are banned on aux-gfid-mount) hence fails. gfid-access translator doesn't allow because it may lead to gfid inconsistency. NOTE: --overwrite option is used in tar over ssh mode to keep gfids intact.
REVIEW: http://review.gluster.org/10899 (geo-rep: Disable xattrs and acls support with tar_ssh) posted (#1) for review on release-3.7 by Kotresh HR (khiremat)
COMMIT: http://review.gluster.org/10899 committed in release-3.7 by Venky Shankar (vshankar) ------ commit 31d494d4f0a4bf7fa588efb57f8dc5e8788c7758 Author: Kotresh HR <khiremat> Date: Thu May 21 11:55:03 2015 +0530 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> Reviewed-on: http://review.gluster.org/10899 Tested-by: Gluster Build System <jenkins.com> Tested-by: NetBSD Build System Reviewed-by: Aravinda VK <avishwan>