summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2014-09-25 17:34:43 +0530
committerVenky Shankar <vshankar@redhat.com>2014-09-28 23:32:42 -0700
commit7113d873af1f129effd8c6da21b49e797de8eab0 (patch)
tree92428ed5e69cfe7741d776e53aebdba8e3d683be /geo-replication/syncdaemon/resource.py
parentcf595e84a5d7fe3c99434dac71807f82e606cec4 (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: 1146823 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>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-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: