summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index 951e733b4db..72aaff58ffc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -17,6 +17,7 @@
#include "xdr-generic.h"
#include "glusterd.h"
#include "glusterd-op-sm.h"
+#include "glusterd-geo-rep.h"
#include "glusterd-store.h"
#include "glusterd-utils.h"
#include "glusterd-volgen.h"
@@ -1467,6 +1468,7 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr)
char key[256] = {0,};
char *brick = NULL;
glusterd_brickinfo_t *brickinfo = NULL;
+ gsync_status_param_t param = {0,};
this = THIS;
GF_ASSERT (this);
@@ -1658,6 +1660,16 @@ glusterd_op_stage_remove_brick (dict_t *dict, char **op_errstr)
}
}
+ /* If geo-rep is configured, for this volume, it should be
+ * stopped.
+ */
+ param.volinfo = volinfo;
+ ret = glusterd_check_geo_rep_running (&param, op_errstr);
+ if (ret || param.is_active) {
+ ret = -1;
+ goto out;
+ }
+
break;
case GF_OP_CMD_COMMIT_FORCE: