Bug 1223642 - [geo-rep]: With tarssh the file is created at slave but it doesnt get sync
Summary: [geo-rep]: With tarssh the file is created at slave but it doesnt get sync
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1222776 1223644
TreeView+ depends on / blocked
 
Reported: 2015-05-21 06:11 UTC by Kotresh HR
Modified: 2016-06-16 13:03 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1222776
: 1223644 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:03:49 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kotresh HR 2015-05-21 06:11:53 UTC
+++ 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.

Comment 1 Kotresh HR 2015-05-21 06:14:12 UTC
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.

Comment 2 Anand Avati 2015-05-21 07:13:24 UTC
REVIEW: http://review.gluster.org/10873 (geo-rep: Disable xattrs and acls support with tar_ssh) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 3 Anand Avati 2015-05-21 09:04:20 UTC
REVIEW: http://review.gluster.org/10873 (geo-rep: Disable xattrs and acls support with tar_ssh) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 4 Anand Avati 2015-05-28 06:36:33 UTC
REVIEW: http://review.gluster.org/10873 (geo-rep: Disable xattrs and acls support with tar_ssh) posted (#3) for review on master by Kotresh HR (khiremat)

Comment 5 Anand Avati 2015-05-29 06:19:34 UTC
COMMIT: http://review.gluster.org/10873 committed in master by Venky Shankar (vshankar) 
------
commit 3eaf21e3cc8cf481226d1ed495d7261b1acbb594
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.
    
    Change-Id: I6821d327e7fe15545adef644869aa2389f79c701
    BUG: 1223642
    Signed-off-by: Kotresh HR <khiremat>
    Reviewed-on: http://review.gluster.org/10873
    Tested-by: NetBSD Build System
    Reviewed-by: Venky Shankar <vshankar>

Comment 6 Niels de Vos 2016-06-16 13:03:49 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.