diff options
author | Kotresh HR <khiremat@redhat.com> | 2017-10-06 23:45:49 -0400 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2017-10-12 18:38:41 +0000 |
commit | da64b539802525baf47b947b616c88cb8c038682 (patch) | |
tree | 603cc4f10dfb229c24a1c5f2e2a57030ddf13236 /geo-replication/syncdaemon/master.py | |
parent | e59c078f5ad8b92966033f9c008193938ba6f3ca (diff) |
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 <khiremat@redhat.com>
(cherry picked from commit 34d52445a9058310d7512c9bcc8c01e709aac1ef)
Change-Id: Iefe641437b5d5be583f079fc2a7a8443bcd19f9d
BUG: 1500845
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/master.py')
-rw-r--r-- | geo-replication/syncdaemon/master.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |