From a60fc2ddc03134fb23c5ed5c0bcb195e1649416b Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Wed, 21 Feb 2018 12:46:25 +0530 Subject: glusterd: handling brick termination in brick-mux Problem: There's a race between the last glusterfs_handle_terminate() response sent to glusterd and the kill that happens immediately if the terminated brick is the last brick. Solution: When it is a last brick for the brick process, instead of glusterfsd killing itself, glusterd will kill the process in case of brick multiplexing. And also changing gf_attach utility accordingly. Change-Id: I386c19ca592536daa71294a13d9fc89a26d7e8c0 fixes: bz#1545048 BUG: 1545048 Signed-off-by: Sanju Rakonde --- xlators/mgmt/glusterd/src/glusterd-utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 0e9e54a0687..8118c994974 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -182,7 +182,8 @@ glusterd_brick_process_add_brick (glusterd_brickinfo_t *brickinfo, glusterd_volinfo_t *volinfo); int -glusterd_brick_process_remove_brick (glusterd_brickinfo_t *brickinfo); +glusterd_brick_process_remove_brick (glusterd_brickinfo_t *brickinfo, + int *kill_pid); int glusterd_brick_proc_for_port (int port, glusterd_brick_proc_t **brickprocess); -- cgit