From da64b539802525baf47b947b616c88cb8c038682 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Fri, 6 Oct 2017 23:45:49 -0400 Subject: geo-rep: Add EINTR to retry list while doing readlink Worker occasionally crashed with EINTR on readlink. This is not persistent and is transient. Worker restart invovles re-processing of few entries in changenlogs. So adding EINTR to retry list to avoid worker restart. > Change-Id: Iefe641437b5d5be583f079fc2a7a8443bcd19f9d > BUG: 1499393 > Signed-off-by: Kotresh HR (cherry picked from commit 34d52445a9058310d7512c9bcc8c01e709aac1ef) Change-Id: Iefe641437b5d5be583f079fc2a7a8443bcd19f9d BUG: 1500845 Signed-off-by: Kotresh HR --- geo-replication/syncdaemon/master.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'geo-replication') diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index b1dcdfceec2..4c1a529a3ed 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -18,7 +18,7 @@ import fcntl import string import errno import tarfile -from errno import ENOENT, ENODATA, EEXIST, EACCES, EAGAIN, ESTALE +from errno import ENOENT, ENODATA, EEXIST, EACCES, EAGAIN, ESTALE, EINTR from threading import Condition, Lock from datetime import datetime from gconf import gconf @@ -1017,7 +1017,8 @@ class GMasterChangelogMixin(GMasterCommon): rl = None if st and stat.S_ISLNK(st.st_mode): - rl = errno_wrap(os.readlink, [en], [ENOENT], [ESTALE]) + rl = errno_wrap(os.readlink, [en], [ENOENT], + [ESTALE, EINTR]) if isinstance(rl, int): rl = None @@ -1043,13 +1044,14 @@ class GMasterChangelogMixin(GMasterCommon): rl = None if st and stat.S_ISLNK(st.st_mode): rl = errno_wrap(os.readlink, [en], [ENOENT], - [ESTALE]) + [ESTALE, EINTR]) if isinstance(rl, int): rl = None entries.append(edct(ty, stat=st, entry=en, gfid=gfid, link=rl)) elif ty == 'SYMLINK': - rl = errno_wrap(os.readlink, [en], [ENOENT], [ESTALE]) + rl = errno_wrap(os.readlink, [en], [ENOENT], + [ESTALE, EINTR]) if isinstance(rl, int): continue -- cgit