From a86e36373b648ba51a286614cae889a0fe9d3f52 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Tue, 11 Dec 2012 13:31:12 +0530 Subject: gsyncd / geo-rep: do not start geo-rep if replace brick is in progress Change-Id: I9db32544ceb6f90c8231aaf40d722f6869a72614 BUG: 861945 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/4289 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index eeb8e940db8..419f3ad025b 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) -- cgit