summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd-mgmt.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-16 09:39:21 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-17 11:57:39 -0700
commitabc2a6b0b91a82bb59327cd2a4ca72b8954e1425 (patch)
tree5c2e73211332d2ba431d17600fdc936f434da15c /glusterfsd/src/glusterfsd-mgmt.c
parentca6528592eed88ff1598b25f1aaa1c99c14a2e32 (diff)
glusterfsd: log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'glusterfsd/src/glusterfsd-mgmt.c')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 86bd482f7..77b18e972 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -425,6 +425,7 @@ mgmt_submit_request (void *req, call_frame_t *frame,
if (req && sfunc) {
ret = sfunc (iov, req);
if (ret == -1) {
+ gf_log ("", GF_LOG_WARNING, "failed to create XDR payload");
goto out;
}
iov.iov_len = ret;
@@ -617,7 +618,7 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_getspec_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (frame->this->name, GF_LOG_ERROR, "error");
+ gf_log (frame->this->name, GF_LOG_ERROR, "XDR decoding error");
ret = -1;
goto out;
}
@@ -872,16 +873,21 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)
rpc = rpc_clnt_new (options, THIS->ctx, THIS->name);
if (!rpc) {
ret = -1;
+ gf_log ("", GF_LOG_WARNING, "failed to create rpc clnt");
goto out;
}
ret = rpc_clnt_register_notify (rpc, mgmt_rpc_notify, THIS);
- if (ret)
+ if (ret) {
+ gf_log ("", GF_LOG_WARNING, "failed to register notify function");
goto out;
+ }
ret = rpcclnt_cbk_program_register (rpc, &mgmt_cbk_prog);
- if (ret)
+ if (ret) {
+ gf_log ("", GF_LOG_WARNING, "failed to register callback function");
goto out;
+ }
ret = rpc_clnt_start (rpc);
if (ret)
@@ -910,7 +916,7 @@ mgmt_pmap_signin_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = xdr_to_pmap_signin_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log (frame->this->name, GF_LOG_ERROR, "error");
+ gf_log (frame->this->name, GF_LOG_ERROR, "XDR decode error");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
@@ -976,7 +982,7 @@ mgmt_pmap_signout_cbk (struct rpc_req *req, struct iovec *iov, int count,
ctx = glusterfs_ctx_get ();
ret = xdr_to_pmap_signout_rsp (*iov, &rsp);
if (ret < 0) {
- gf_log ("", GF_LOG_ERROR, "error");
+ gf_log ("", GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;