diff options
author | Kotresh HR <khiremat@redhat.com> | 2017-03-20 05:21:59 -0400 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2017-04-07 02:08:31 -0400 |
commit | cbcb1d33de8c4bd7250a5c038e8f95456772add1 (patch) | |
tree | 2c1712cfcec01c60e24501df02d154793e5bc9a8 /geo-replication/syncdaemon/syncdutils.py | |
parent | c932c0df4b70abaa85354e56efe6f1ce88ce4a38 (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.
Change-Id: Ia067ccc6547731f28f2a315d400705e616cbf662
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>
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
-rw-r--r-- | geo-replication/syncdaemon/syncdutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index 4d981f9fe53..225ce2c0db5 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -492,12 +492,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): |