From f37fc4022ffa3d37d4ccf9b49679d9738d9e1620 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 2 Oct 2012 19:10:36 +0530 Subject: mgmt/glusterd: Trigger quorum action on peer deletion Change-Id: I8f44a921d7df3e7409e5cc5ffd206c7fc2baca17 BUG: 862017 Signed-off-by: Pranith Kumar K Reviewed-on: https://code.engineering.redhat.com/gerrit/46 Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 06f84257b63..f997dec341e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -905,7 +905,10 @@ glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo) { GF_ASSERT (peerinfo); glusterd_peerctx_t *peerctx = NULL; + gf_boolean_t quorum_action = _gf_false; + if (peerinfo->quorum_contrib != QUORUM_NONE) + quorum_action = _gf_true; if (peerinfo->rpc) { /* cleanup the saved-frames before last unref */ rpc_clnt_connection_cleanup (&peerinfo->rpc->conn); @@ -919,6 +922,8 @@ glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo) } glusterd_peer_destroy (peerinfo); + if (quorum_action) + glusterd_do_quorum_action (); return 0; } -- cgit