From aa7b0c640818df25b4f0297b1931ff52a77121bf Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Thu, 12 Dec 2013 17:03:09 +0530 Subject: gsyncd / geo-rep: ignore DHTs sticky bit file during crawl Change-Id: Ide927759c6a3d5301475eac9f6e785aa901d426e BUG: 1036539 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/6792 Reviewed-by: Kotresh HR Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- geo-replication/syncdaemon/resource.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'geo-replication/syncdaemon/resource.py') diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 05c63e88a..41add6fb2 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 @@ -1139,6 +1151,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 -- cgit