From eb1e3aebc152aa6ec2123376d479730185f3a031 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 20 Mar 2017 05:21:59 -0400 Subject: 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 > Reviewed-on: https://review.gluster.org/16924 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > Reviewed-by: Aravinda VK > CentOS-regression: Gluster Build System Change-Id: Ia067ccc6547731f28f2a315d400705e616cbf662 BUG: 1441927 Signed-off-by: Kotresh HR Reviewed-on: https://review.gluster.org/17049 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Aravinda VK --- geo-replication/syncdaemon/syncdutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'geo-replication/syncdaemon/syncdutils.py') 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): -- cgit