summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/syncdutils.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-03-20 05:21:59 -0400
committerRaghavendra Talur <rtalur@redhat.com>2017-04-27 10:45:42 +0000
commiteb1e3aebc152aa6ec2123376d479730185f3a031 (patch)
tree4cbd8c6a96ec0253a3f78bc0b93e2fe599796fe7 /geo-replication/syncdaemon/syncdutils.py
parentfd6f5725a9fdbd6544548285d0853bdba83aeaff (diff)
geo-rep: Retry on EBUSY
Do not crash on EBUSY error. Add EBUSY retry errno list. Crash only if the error persists even after max retries. > BUG: 1434018 > Signed-off-by: Kotresh HR <khiremat@redhat.com> > Reviewed-on: https://review.gluster.org/16924 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Aravinda VK <avishwan@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Change-Id: Ia067ccc6547731f28f2a315d400705e616cbf662 BUG: 1441927 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17049 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
-rw-r--r--geo-replication/syncdaemon/syncdutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
index d197b122b8f..1d801938b69 100644
--- a/geo-replication/syncdaemon/syncdutils.py
+++ b/geo-replication/syncdaemon/syncdutils.py
@@ -482,12 +482,12 @@ def errno_wrap(call, arg=[], errnos=[], retry_errnos=[]):
# probably a screwed state, cannot do much...
logging.warn('reached maximum retries (%s)...%s' %
(repr(arg), ex))
- return ex.errno
+ raise
time.sleep(0.250) # retry the call
def lstat(e):
- return errno_wrap(os.lstat, [e], [ENOENT], [ESTALE])
+ return errno_wrap(os.lstat, [e], [ENOENT], [ESTALE, EBUSY])
class NoStimeAvailable(Exception):