diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2019-05-08 07:58:27 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-05-08 15:04:50 +0000 |
commit | d42221bec9ebb87df0c10b8e99edde60729250e3 (patch) | |
tree | 7412088d4fa5e4f19e135fdf388de2dedf46e67b | |
parent | 40983d802f41033a29d4f21d2996e9bda31a91c1 (diff) |
glusterd: improve logging in __server_getspec()
updates: bz#1193929
Change-Id: Idad745d5869c92e6bed71842f14bc1a3362ca4bd
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 14 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-messages.h | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 1ba58c3ab9e..26cfdd1fba5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -927,6 +927,8 @@ __server_getspec(rpcsvc_request_t *req) if (ret < 0) { // failed to decode msg; req->rpc_err = GARBAGE_ARGS; + gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_REQ_DECODE_FAIL, + "Failed to decode the message"); goto fail; } @@ -941,6 +943,9 @@ __server_getspec(rpcsvc_request_t *req) goto fail; } + gf_msg(this->name, GF_LOG_INFO, 0, GD_MSG_MOUNT_REQ_RCVD, + "Recevied mount request for valume %s", volume); + /* Need to strip leading '/' from volnames. This was introduced to * support nfs style mount parameters for native gluster mount */ @@ -974,8 +979,12 @@ __server_getspec(rpcsvc_request_t *req) trans = req->trans; /* addrstr will be empty for cli socket connections */ ret = rpcsvc_transport_peername(trans, (char *)&addrstr, sizeof(addrstr)); - if (ret) + if (ret) { + gf_msg(this->name, GF_LOG_ERROR, 0, + GD_MSG_RPC_TRANSPORT_GET_PEERNAME_FAIL, + "Failed to get the peername"); goto fail; + } tmp = strrchr(addrstr, ':'); if (tmp) @@ -1045,6 +1054,9 @@ fail: GF_FREE(brick_name); rsp.op_ret = ret; + if (rsp.op_ret) + gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_MOUNT_REQ_FAIL, + "Failed to mount the volume"); if (op_errno) rsp.op_errno = gf_errno_to_error(op_errno); diff --git a/xlators/mgmt/glusterd/src/glusterd-messages.h b/xlators/mgmt/glusterd/src/glusterd-messages.h index 273ac800576..3a6e94018b0 100644 --- a/xlators/mgmt/glusterd/src/glusterd-messages.h +++ b/xlators/mgmt/glusterd/src/glusterd-messages.h @@ -300,6 +300,7 @@ GLFS_MSGID( GD_MSG_MANAGER_FUNCTION_FAILED, GD_MSG_DAEMON_LOG_LEVEL_VOL_OPT_VALIDATE_FAIL, GD_MSG_SHD_START_FAIL, GD_MSG_SHD_OBJ_GET_FAIL, GD_MSG_SVC_ATTACH_FAIL, GD_MSG_ATTACH_INFO, - GD_MSG_DETACH_INFO, GD_MSG_SVC_DETACH_FAIL); + GD_MSG_DETACH_INFO, GD_MSG_SVC_DETACH_FAIL, + GD_MSG_RPC_TRANSPORT_GET_PEERNAME_FAIL); #endif /* !_GLUSTERD_MESSAGES_H_ */ |