summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2014-01-29 20:27:12 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-06 01:56:40 -0800
commit7289fa908b4355a148adb610534aceee8761a547 (patch)
tree0103ee1837872b3485e3f6da66fe8301539766d3 /geo-replication/syncdaemon/resource.py
parent5c926a14d8479b2a9aba6aa50478625d444bf42b (diff)
gsyncd / geo-rep: ignore DHTs sticky bit file during crawl
Change-Id: I0a6eeee8ae192d086b34d316ee1b82c7d76634da BUG: 1036539 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/6792 Reviewed-on: http://review.gluster.org/6859 Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r--geo-replication/syncdaemon/resource.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 955491d38..32aa7d1c7 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -321,6 +321,18 @@ class Server(object):
else:
raise
+ @classmethod
+ @_pathguard
+ def linkto_check(cls, path):
+ try:
+ return not (Xattr.lgetxattr_buf(path, 'trusted.glusterfs.dht.linkto') == '')
+ except (IOError, OSError):
+ ex = sys.exc_info()[1]
+ if ex.errno in (ENOENT, ENODATA):
+ return False
+ else:
+ raise
+
@classmethod
@_pathguard
@@ -1135,6 +1147,9 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote):
def gfid(cls, e):
""" path based backend gfid fetch """
return super(brickserver, cls).gfid(e)
+ @classmethod
+ def linkto_check(cls, e):
+ return super(brickserver, cls).linkto_check(e)
if gconf.slave_id:
# define {,set_}xtime in slave, thus preempting
# the call to remote, so that it takes data from