From 7113d873af1f129effd8c6da21b49e797de8eab0 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 25 Sep 2014 17:34:43 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/8865 Reviewed-by: Aravinda VK Tested-by: Gluster Build System Reviewed-by: Venky Shankar Tested-by: Venky Shankar --- geo-replication/syncdaemon/resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'geo-replication/syncdaemon/resource.py') 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: -- cgit