diff options
| author | Aravinda VK <avishwan@redhat.com> | 2015-12-09 13:46:17 +0530 | 
|---|---|---|
| committer | Venky Shankar <vshankar@redhat.com> | 2015-12-17 21:46:35 -0800 | 
| commit | 3151194fad1aed3ab340b53aeeb4e8d131538d12 (patch) | |
| tree | fa61599518f867c8d3aeab25add5aa56c2c14a7a /geo-replication/syncdaemon/resource.py | |
| parent | ce3ff7e328483dffdae6ae2914924bc2380db67e (diff) | |
geo-rep: Symlink Rename issue
If ENTRY creation failed for symlink in Slave and symlink
renamed in Master. If Source not exists to Rename in Slave
Geo-rep interprets as Create of Target file. Geo-rep sends blob
of regular file to create symlink instead of sending blob of
symlink.
With this patch, Geo-rep identifies symlink and sends respective
blob.
BUG: 1289859
Change-Id: If9351974d1945141a1d3abb838b7d0de7591e48e
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/12917
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Tested-by: Milind Changire <mchangir@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
| -rw-r--r-- | geo-replication/syncdaemon/resource.py | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 740861a23f3..19363401e65 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -717,8 +717,14 @@ class Server(object):                  st = lstat(entry)                  if isinstance(st, int):                      if e['stat'] and not stat.S_ISDIR(e['stat']['mode']): -                        (pg, bname) = entry2pb(en) -                        blob = entry_pack_reg_stat(gfid, bname, e['stat']) +                        if stat.S_ISLNK(e['stat']['mode']) and \ +                           e['link'] is not None: +                            (pg, bname) = entry2pb(en) +                            blob = entry_pack_symlink(gfid, bname, +                                                      e['link'], e['stat']) +                        else: +                            (pg, bname) = entry2pb(en) +                            blob = entry_pack_reg_stat(gfid, bname, e['stat'])                  else:                      cmd_ret = errno_wrap(os.rename,                                           [entry, en],  | 
