summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2014-09-25 17:34:43 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-29 23:33:11 -0700
commit19b2923fd56f19dadf2d81a76a0008784a4f684f (patch)
tree2e863a556317c0d033690236a5d7908279b19c97
parentc3bc8b52b560463706a409836ff7e4118695cb0a (diff)
geo-rep: Fix rename of directory syncing.
The rename of directories are captured in all distributed brick changelogs. gsyncd processess these changelogs on each brick parallellaly. The first changelog to get processed will be successful. All subsequent ones will stat the 'src' and if not present, tries to create freshly on slave. It should be done only for files and not for directories. Hence when this code path was hit, regular file's blob is sent as directory's blob and gfid-access translator was erroring out as 'Invalid blob length' with errno as 'ENOMEM' Change-Id: I50545b02b98846464876795159d2446340155c82 BUG: 1147422 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/8865 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/8880 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--geo-replication/syncdaemon/resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 1bee0a3338f..3a3bd004e8f 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -651,7 +651,7 @@ class Server(object):
en = e['entry1']
st = lstat(entry)
if isinstance(st, int):
- if e['stat']:
+ if e['stat'] and not stat.S_ISDIR(e['stat']['mode']):
(pg, bname) = entry2pb(en)
blob = entry_pack_reg_stat(gfid, bname, e['stat'])
else: