summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2018-01-03 14:29:51 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2018-01-12 05:43:49 +0000
commit8679151392e50e1684ed721710f44dd4fbb992b9 (patch)
tree5122212dab8b83991d6f9f1969632596c98a7700 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent19b74478fc87909b95a6c87ab212f21b79c809f3 (diff)
glusterd: connect to an existing brick process when qourum status is NOT_APPLICABLE_QUORUM
First of all, this patch reverts commit 635c1c3 as the same is causing a regression with bricks not coming up on time when a node is rebooted. This patch tries to fix the problem in a different way by just trying to connect to an existing running brick when quorum status is not applicable. >mainline patch : https://review.gluster.org/#/c/19134/ Change-Id: I0efb5901832824b1c15dcac529bffac85173e097 BUG: 1511301 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e627dcfcc2b..2cc1df22acb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -5783,7 +5783,8 @@ glusterd_get_sock_from_brick_pid (int pid, char *sockpath, size_t len)
int
glusterd_brick_start (glusterd_volinfo_t *volinfo,
glusterd_brickinfo_t *brickinfo,
- gf_boolean_t wait)
+ gf_boolean_t wait,
+ gf_boolean_t only_connect)
{
int ret = -1;
xlator_t *this = NULL;
@@ -5834,7 +5835,9 @@ glusterd_brick_start (glusterd_volinfo_t *volinfo,
ret = 0;
goto out;
}
- brickinfo->start_triggered = _gf_true;
+ if (!only_connect)
+ brickinfo->start_triggered = _gf_true;
+
GLUSTERD_GET_BRICK_PIDFILE (pidfile, volinfo, brickinfo, conf);
if (gf_is_service_running (pidfile, &pid)) {
if (brickinfo->status != GF_BRICK_STARTING &&
@@ -5892,6 +5895,8 @@ glusterd_brick_start (glusterd_volinfo_t *volinfo,
}
return 0;
}
+ if (only_connect)
+ return 0;
run:
ret = _mk_rundir_p (volinfo);
@@ -6019,7 +6024,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
{
glusterd_brick_start
(volinfo, brickinfo,
- _gf_false);
+ _gf_false, _gf_false);
}
pthread_mutex_unlock
(&brickinfo->restart_mutex);
@@ -6068,7 +6073,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
{
glusterd_brick_start
(volinfo, brickinfo,
- _gf_false);
+ _gf_false, _gf_false);
}
pthread_mutex_unlock
(&brickinfo->restart_mutex);