From fe16eaa5104cf015461c7b4b8f0d97e613344b1e Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Sat, 7 Sep 2013 15:20:39 +0530 Subject: geo-rep: pack the value of 'readlink()' while crawling symlinks without having 'readlink()' value, symlink fails on slave mounts Change-Id: Ib84be8db77c033029ba8ba454fd629a496fc3fe1 Signed-off-by: Amar Tumballi BUG: 847839 Reviewed-on: http://review.gluster.org/5950 Reviewed-by: Venky Shankar Tested-by: Gluster Build System --- geo-replication/syncdaemon/master.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 753d0a614fe..95810a61ee1 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -885,7 +885,10 @@ class GMasterXsyncMixin(GMasterChangelogMixin): self.write_entry_change("E", [gfid, 'MKDIR', escape(os.path.join(pargfid, bname))]) self.crawl(e, xtr) elif stat.S_ISLNK(mo): - self.write_entry_change("E", [gfid, 'SYMLINK', escape(os.path.join(pargfid, bname))]) + rl = errno_wrap(os.readlink, [en], [ENOENT]) + if isinstance(rl, int): + continue + self.write_entry_change("E", [gfid, 'SYMLINK', escape(os.path.join(pargfid, bname)), rl]) else: # if a file has a hardlink, create a Changelog entry as 'LINK' so the slave # side will decide if to create the new entry, or to create link. -- cgit