summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2013-08-27 14:02:24 +0530
committerAnand Avati <avati@redhat.com>2013-09-04 20:53:43 -0700
commitf201b46d1b20db1f2b11344e99db3381d9d4c1e1 (patch)
tree36721d5bd05b22bc7c061df1d26c52a558b878a1 /geo-replication
parent8910136c09e11f651fe846e3f357341b9260930e (diff)
gsyncd / geo-rep: handle ENOENT during readlink()
Change-Id: I8611122fda63ea496ad4491473ecabe96bf19cfa BUG: 1003803 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5756 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/master.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index ef151a32ad6..d33e4ed3017 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -18,7 +18,7 @@ from gconf import gconf
from tempfile import mkdtemp, NamedTemporaryFile
from syncdutils import FreeObject, Thread, GsyncdError, boolify, escape, \
unescape, select, gauxpfx, md5hex, selfkill, entry2pb, \
- lstat
+ lstat, errno_wrap
URXTIME = (-1, 0)
@@ -696,7 +696,10 @@ class GMasterChangelogMixin(GMasterCommon):
elif ty == 'LINK':
entries.append(edct(ty, stat=st, entry=en, gfid=gfid))
elif ty == 'SYMLINK':
- entries.append(edct(ty, stat=st, entry=en, gfid=gfid, link=os.readlink(en)))
+ rl = errno_wrap(os.readlink, [en], [ENOENT])
+ if isinstance(rl, int):
+ continue
+ entries.append(edct(ty, stat=st, entry=en, gfid=gfid, link=rl))
elif ty == 'RENAME':
e2 = unescape(os.path.join(pfx, ec[self.POS_ENTRY2]))
entries.append(edct(ty, gfid=gfid, entry=en, entry1=e2, stat=st))