summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-07-28 14:37:47 +0530
committerVenky Shankar <vshankar@redhat.com>2015-08-03 02:34:48 -0700
commit4d2ec1d0d6bebcfb19e0c4ecf741ddd29bb28e58 (patch)
tree2d3407b9a58c7f3ef699a9aded5f9b73c8554c0b /geo-replication
parentaa80be0501a6893564b0dd40611cc91ad553ca6c (diff)
geo-rep: Do not crash worker on ESTALE
Handle ESTALE returned by lstat gracefully by retrying it. Do not crash the worker. Change-Id: I2527cd8bd1f7d2428cb4fa3f20782bebaf2df12a BUG: 1247529 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/syncdutils.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
index b565ec66cb5..3feadb83f32 100644
--- a/geo-replication/syncdaemon/syncdutils.py
+++ b/geo-replication/syncdaemon/syncdutils.py
@@ -489,15 +489,7 @@ def errno_wrap(call, arg=[], errnos=[], retry_errnos=[]):
def lstat(e):
- try:
- return os.lstat(e)
- except (IOError, OSError):
- ex = sys.exc_info()[1]
- if ex.errno == ENOENT:
- return ex.errno
- else:
- raise
-
+ return errno_wrap(os.lstat, [e], [ENOENT], [ESTALE])
class NoPurgeTimeAvailable(Exception):
pass