summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2015-02-04 23:08:31 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-27 04:39:01 -0700
commit5dd40bd4ad768c4d2eb07520efeb49467c709df6 (patch)
tree29a46a41ba3f9758912413b1953ef9ecae322355 /geo-replication
parent60f764631971de4357d2f72a8995f844949de8ca (diff)
geo-rep: Re Enable ignore_deletes Option
If this option is set, Deletes will not be propogated to Slave. This option is applicable for UNLINK and RMDIR. gluster volume geo-replication <MASTER> <SLAVEHOST>::<SLAVEVOL> \ config ignore_deletes true Default value is false. PS: Use this option with caution, If you create the file in master with same path then it fails to sync to slave. Old file in Slave will have different GFID compared to New. BUG: 1189363 Change-Id: I1f7816d1ea36460a654873739d3fb1b6c13e0f8d Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/9583 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/configinterface.py.in4
-rw-r--r--geo-replication/syncdaemon/master.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/configinterface.py.in b/geo-replication/syncdaemon/configinterface.py.in
index 1c174b5b760..f8df49935f1 100644
--- a/geo-replication/syncdaemon/configinterface.py.in
+++ b/geo-replication/syncdaemon/configinterface.py.in
@@ -60,6 +60,10 @@ CONFIGS = (
"working_dir",
"@localstatedir@/run/gluster/${mastervol}/${eSlave}",
"${iprefix}/lib/misc/glusterfsd/${mastervol}/${eSlave}"),
+ ("peersrx . .",
+ "ignore_deletes",
+ "true",
+ "false"),
)
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index d06b9794c73..b311f4d3591 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -946,8 +946,9 @@ class GMasterChangelogMixin(GMasterCommon):
if pt in datas:
datas.remove(pt)
- purge_update()
- entries.append(edct(ty, gfid=gfid, entry=en))
+ if not boolify(gconf.ignore_deletes):
+ purge_update()
+ entries.append(edct(ty, gfid=gfid, entry=en))
elif ty in ['CREATE', 'MKDIR', 'MKNOD']:
entry_update()
# stat information present in the changelog itself