diff options
author | Kotresh HR <khiremat@redhat.com> | 2017-10-06 23:45:49 -0400 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2017-10-11 10:16:52 +0000 |
commit | 34d52445a9058310d7512c9bcc8c01e709aac1ef (patch) | |
tree | 0e237518f8153a5c7a58fb687ce0a642f35e8359 | |
parent | b56bdb34dafd1a87c5bbb2c9a75d1a088d82b1f4 (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>
-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 2987bca0601..794e32cabed 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 @@ -1016,7 +1016,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 @@ -1042,13 +1043,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 |