diff options
author | Amar Tumballi <amarts@redhat.com> | 2013-09-07 15:20:39 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-09-20 11:46:58 -0700 |
commit | fe16eaa5104cf015461c7b4b8f0d97e613344b1e (patch) | |
tree | ecc289bfa588ff4305ea4c7ef86282430a0356ac /geo-replication/syncdaemon | |
parent | 9905b562a3d4b508f83123e43574e8087651b357 (diff) |
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 <amarts@redhat.com>
BUG: 847839
Reviewed-on: http://review.gluster.org/5950
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'geo-replication/syncdaemon')
-rw-r--r-- | geo-replication/syncdaemon/master.py | 5 |
1 files changed, 4 insertions, 1 deletions
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. |