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 02:24:49 -0700
commitf999a8634850db0627c768b12dba0aa84b4ff7b7 (patch)
tree2c404ae50916ce1086c696f077bdbcf19e1c01fa /geo-replication
parent457edddbaae62d6956c37b6d1fd45c75ae2c7cff (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: 1223280 Change-Id: If275c89fb9fc7d16004550805a4cd65be818540d Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/10837 Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.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