summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-08-18 23:06:13 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-08-29 12:39:52 +0000
commit7e89bcd213fd69dd6da7cdb1ec0699e7b8a547d5 (patch)
tree53bf474d8514c2ddc04a190aba3769b2cc6c9d35 /xlators/mgmt
parentbec4e0ca91fecd0788386b2608da7f0ac4c728d5 (diff)
glusterd: replace-brick executing successfully when quorum does not met
Problem: replace-brick command on a setup where quorum does not met executing successfully. Fix: With the fix glusterd is validating whether server is in quorum or not during replace-brick staging >Reviewed-on: https://review.gluster.org/18068 >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I8017154bb62bdcc6c6490e720ecfe9cde090c161 BUG: 1486110 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/18125 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 887c3496475..ab38725ffb0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -21,6 +21,7 @@
#include "glusterd-nfs-svc.h"
#include "glusterd-volgen.h"
#include "glusterd-messages.h"
+#include "glusterd-server-quorum.h"
#include "glusterd-mgmt.h"
#include "run.h"
#include "syscall.h"
@@ -210,6 +211,14 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
if (ret)
goto out;
+ ret = glusterd_validate_quorum (this, gd_op, dict, op_errstr);
+ if (ret) {
+ gf_msg (this->name, GF_LOG_CRITICAL, 0,
+ GD_MSG_SERVER_QUORUM_NOT_MET,
+ "Server quorum not met. Rejecting operation.");
+ goto out;
+ }
+
if (strcmp (op, "GF_REPLACE_OP_COMMIT_FORCE")) {
ret = -1;
goto out;