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>
This commit is contained in:
parent
457edddbaa
commit
f999a86348
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user