summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2013-08-21 20:38:09 +0530
committerAnand Avati <avati@redhat.com>2013-09-04 20:49:50 -0700
commitaa292ab99c9db37dd5080aa5d65f24a8887b855b (patch)
treefb2100e67b574098611481fb330767b1388b18f3
parent2f305eaed9805ff32c95680c5ac83e001d100cdc (diff)
gsyncd / geo-rep: fix "regular file" overloading rename
entry operation on the slave was using source parent gfid and basename when renames are overloaded to use regular file creation. This patch fixes the issue by using the destination parent gfid and basename for these cases. Change-Id: I1a4e8df7f07905224ce44ef5abd6f180234285ab BUG: 1003800 Tested-by: Amar Tumballi <amarts@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/5754 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--geo-replication/syncdaemon/resource.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 2357b4f91..c3d31b786 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -525,6 +525,7 @@ class Server(object):
en = e['entry1']
st = lstat(entry)
if isinstance(st, int):
+ (pg, bname) = entry2pb(en)
blob = entry_pack_reg(gfid, bname, e['stat'])
else:
errno_wrap(os.rename, [entry, en], [ENOENT, EEXIST])