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-05 23:17:25 -0700
commit2fd4ae628c7940ef5b505666afbf5eae0cc655b9 (patch)
tree03d7f923de2797f5f8f252449c9ee6bb972ab2ad /geo-replication
parentb7118970edab7c3ab9c7039ef340c40326ff6930 (diff)
geo-rep: Do not crash worker on ESTALE
Handle ESTALE returned by lstat gracefully by retrying it. Do not crash the worker. BUG: 1249547 Change-Id: I57fb9933900153ab41c3d9b73748b1cdaa8d89ca 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> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11820 Reviewed-by: Milind Changire <mchangir@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 b565ec6..3feadb8 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