summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2016-08-02 11:23:07 +0530
committerNiels de Vos <ndevos@redhat.com>2016-08-03 02:32:27 -0700
commit2ea73c9982a30dd9a64f35c0bd19563ce5709175 (patch)
tree5d9bef4c53579028ed47d35f3a5c37e2f0641fc8 /xlators
parentd64347d286b256e631b34b77c82216c0f122da42 (diff)
georep: add reset-sync-time option for session delete
Set the stime xattr at all the brick roots to (0,0) if the argument reset-sync-time has been provided on the command-line. To avoid testing against directory specific stime, the remote stime is assumed to be minus_infinity, if the root directory stime is set to (0,0), before the directory scan begins. This triggers a full volume resync to slave in the case of a geo-rep session recreation with the same master-slave volume pair. Command synopsis: gluster volume geo-replication <MASTERVOL> <SLAVE>::<SLAVEVOL> delete \ [reset-sync-time] Update gluster cli man page to include new sub-command reset-sync-time. > Reviewed-on: http://review.gluster.org/14051 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Aravinda VK <avishwan@redhat.com> > Reviewed-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 70fd68d94f768c098b3178c151fa92c5079a8cfd) Change-Id: Ie4ce03b9425ed9bb81eda8681058c0fc6f990948 BUG: 1357773 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/14953 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 625c355c7b0..1b0af527897 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -5008,6 +5008,7 @@ glusterd_gsync_delete (glusterd_volinfo_t *volinfo, char *slave,
char geo_rep_dir[PATH_MAX] = "";
char *conf_path = NULL;
xlator_t *this = NULL;
+ uint32_t reset_sync_time = _gf_false;
this = THIS;
GF_ASSERT (this);
@@ -5044,6 +5045,13 @@ glusterd_gsync_delete (glusterd_volinfo_t *volinfo, char *slave,
runner_argprintf (&runner, "%s", conf_path);
runner_argprintf (&runner, "--iprefix=%s", DATADIR);
+ runner_argprintf (&runner, "--path-list=%s", path_list);
+
+ ret = dict_get_uint32 (dict, "reset-sync-time", &reset_sync_time);
+ if (!ret && reset_sync_time) {
+ runner_add_args (&runner, "--reset-sync-time", NULL);
+ }
+
if (volinfo) {
master = volinfo->volname;
runner_argprintf (&runner, ":%s", master);