summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c56
1 files changed, 3 insertions, 53 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index faba30221fd..e21b67e6d11 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -3423,7 +3423,6 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
int ret = 0;
glusterd_peerinfo_t *peerinfo = NULL;
glusterd_peerctx_t *peerctx = NULL;
- uuid_t *peer_uuid = NULL;
gf_boolean_t quorum_action = _gf_false;
peerctx = mydata;
@@ -3459,64 +3458,15 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
peerinfo->quorum_action = _gf_false;
}
- // Remove peer if it is not a friend and connection/handshake
- // fails, and notify cli. Happens only during probe.
+ /* Remove peer if it is not a friend and connection/handshake
+ * fails, and notify cli. Happens only during probe.
+ */
if (peerinfo->state.state == GD_FRIEND_STATE_DEFAULT) {
glusterd_friend_remove_notify (peerctx);
goto out;
}
- /*
- local glusterd (thinks that it) is the owner of the cluster
- lock and 'fails' the operation on the first disconnect from
- a peer.
- */
- if (peerinfo->connected) {
- /*TODO: The following is needed till all volume
- * operations are synctaskized.
- * */
- if (is_origin_glusterd ()) {
- switch (glusterd_op_get_op ()) {
- case GD_OP_START_VOLUME:
- case GD_OP_ADD_BRICK:
- case GD_OP_REMOVE_BRICK:
- case GD_OP_STATUS_VOLUME:
- break;
-
- default:
- ret = glusterd_op_sm_inject_event
- (GD_OP_EVENT_START_UNLOCK, NULL);
- if (ret)
- gf_log (this->name,
- GF_LOG_ERROR,
- "Unable to enqueue "
- "cluster unlock event");
-
- break;
- }
-
- } else {
- peer_uuid = GF_CALLOC (1, sizeof (*peer_uuid),
- gf_common_mt_char);
-
- if (peer_uuid) {
- uuid_copy (*peer_uuid, peerinfo->uuid);
- ret = glusterd_op_sm_inject_event
- (GD_OP_EVENT_LOCAL_UNLOCK_NO_RESP,
- peer_uuid);
- if (ret)
- gf_log (this->name,
- GF_LOG_ERROR,
- "Unable to enqueue "
- "local lock flush "
- "event.");
- }
- }
-
- }
-
peerinfo->connected = 0;
- //default_notify (this, GF_EVENT_CHILD_DOWN, NULL);
break;
}
default: