summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-05-20 14:34:11 +0530
committerVenky Shankar <vshankar@redhat.com>2015-05-31 23:38:15 -0700
commitde256912050bc3d41c6e5ea8b003cf50bd8c7399 (patch)
tree32008e331906adb21252602fdfc37617bc5c80f3 /geo-replication
parent661142d7c934f36236909137f496095eb88a4129 (diff)
geo-rep: Ignore ESTALE during unlink/rmdir
during unlink/rmdir of Parent_GFID/Basename, if parent directory does not exists. Parent GFID will not get resolved and DHT raises ESTALE instead of ENOENT. Now ESTALE errors ignored during unlink/rmdir BUG: 1223286 Change-Id: If275c89fb9fc7d16004550805a4cd65be818540d Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed On: http://review.gluster.org/#/c/10837/ Reviewed-on: http://review.gluster.org/10913 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/resource.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index d5d8d02e05e..ba92a4a53fd 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -600,10 +600,11 @@ class Server(object):
if not matching_disk_gfid(gfid, entry):
return
- er = errno_wrap(os.unlink, [entry], [ENOENT, EISDIR])
+ er = errno_wrap(os.unlink, [entry], [ENOENT, ESTALE, EISDIR])
if isinstance(er, int):
if er == EISDIR:
- er = errno_wrap(os.rmdir, [entry], [ENOENT, ENOTEMPTY])
+ er = errno_wrap(os.rmdir, [entry], [ENOENT, ESTALE,
+ ENOTEMPTY])
if er == ENOTEMPTY:
return er
@@ -654,7 +655,8 @@ class Server(object):
fullname = os.path.join(path, name)
if not matching_disk_gfid(gfid, entry):
return
- er = errno_wrap(os.remove, [fullname], [ENOENT, EISDIR])
+ er = errno_wrap(os.remove, [fullname], [ENOENT, ESTALE,
+ EISDIR])
if er == EISDIR:
recursive_rmdir(gfid, entry, fullname)
@@ -662,7 +664,7 @@ class Server(object):
if not matching_disk_gfid(gfid, entry):
return
- errno_wrap(os.rmdir, [path], [ENOENT])
+ errno_wrap(os.rmdir, [path], [ENOENT, ESTALE])
for e in entries:
blob = None