summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2012-12-11 13:31:12 +0530
committerAnand Avati <avati@redhat.com>2012-12-11 16:26:52 -0800
commita86e36373b648ba51a286614cae889a0fe9d3f52 (patch)
tree81f5a261ca7f15334dea1c5d508c2e5b5431d582 /xlators
parentcc9701d4f533bf7337d2925424e2498ab64fdf13 (diff)
gsyncd / geo-rep: do not start geo-rep if replace brick is in progress
Change-Id: I9db32544ceb6f90c8231aaf40d722f6869a72614 BUG: 861945 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/4289 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index eeb8e940..419f3ad0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -1184,6 +1184,16 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
switch (type) {
case GF_GSYNC_OPTION_TYPE_START:
+ /* don't attempt to start gsync if replace-brick is
+ * in progress */
+ if (glusterd_is_rb_ongoing (volinfo)) {
+ snprintf (errmsg, sizeof(errmsg),"replace-brick is in"
+ " progress, not starting geo-replication");
+ *op_errstr = gf_strdup (errmsg);
+ ret = -1;
+ goto out;
+ }
+
ret = glusterd_op_verify_gsync_start_options (volinfo, slave,
op_errstr);
if (ret)