summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-16 06:43:12 +0000
committerAnand Avati <avati@gluster.com>2011-06-16 22:02:13 -0700
commit0101eb0b6444dc22860d8fdc82170aefa87ff0b3 (patch)
tree83031b823600d1f905d36a15d26b427585c00cc1 /glusterfsd
parent25e8700721a71128c9f6143dc2effcdbcee692fc (diff)
logging: fill proper domain names at places where it is missing
also changed some error messages where it was not explicit Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@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')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 01bd8a58f..c9ceb7c48 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -78,7 +78,7 @@ glusterfs_serialize_reply (rpcsvc_request_t *req, void *arg,
*/
iob = iobuf_get (req->svc->ctx->iobuf_pool);
if (!iob) {
- gf_log ("", GF_LOG_ERROR, "Failed to get iobuf");
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to get iobuf");
goto ret;
}
@@ -91,7 +91,7 @@ glusterfs_serialize_reply (rpcsvc_request_t *req, void *arg,
*/
retlen = sfunc (*outmsg, arg);
if (retlen == -1) {
- gf_log ("", GF_LOG_ERROR, "Failed to encode message");
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to encode message");
goto ret;
}
@@ -124,7 +124,7 @@ glusterfs_submit_reply (rpcsvc_request_t *req, void *arg,
if (!iobref) {
iobref = iobref_new ();
if (!iobref) {
- gf_log ("", GF_LOG_ERROR, "out of memory");
+ gf_log (THIS->name, GF_LOG_ERROR, "out of memory");
goto out;
}
@@ -133,7 +133,7 @@ glusterfs_submit_reply (rpcsvc_request_t *req, void *arg,
iob = glusterfs_serialize_reply (req, arg, sfunc, &rsp);
if (!iob) {
- gf_log ("", GF_LOG_ERROR, "Failed to serialize reply");
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to serialize reply");
goto out;
}
@@ -148,7 +148,7 @@ glusterfs_submit_reply (rpcsvc_request_t *req, void *arg,
*/
iobuf_unref (iob);
if (ret == -1) {
- gf_log ("", GF_LOG_ERROR, "Reply submission failed");
+ gf_log (THIS->name, GF_LOG_ERROR, "Reply submission failed");
goto out;
}
@@ -426,7 +426,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");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to create XDR payload");
goto out;
}
iov.iov_len = ret;
@@ -635,7 +635,8 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
size = rsp.op_ret;
if (size == oldvollen && (memcmp (oldvolfile, rsp.spec, size) == 0)) {
- gf_log ("", GF_LOG_INFO, "No change in volfile, continuing");
+ gf_log (frame->this->name, GF_LOG_INFO,
+ "No change in volfile, continuing");
goto out;
}
@@ -874,19 +875,19 @@ 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");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to create rpc clnt");
goto out;
}
ret = rpc_clnt_register_notify (rpc, mgmt_rpc_notify, THIS);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "failed to register notify function");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to register notify function");
goto out;
}
ret = rpcclnt_cbk_program_register (rpc, &mgmt_cbk_prog);
if (ret) {
- gf_log ("", GF_LOG_WARNING, "failed to register callback function");
+ gf_log (THIS->name, GF_LOG_WARNING, "failed to register callback function");
goto out;
}
@@ -1043,14 +1044,14 @@ 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, "XDR decoding failed");
+ gf_log (THIS->name, GF_LOG_ERROR, "XDR decoding failed");
rsp.op_ret = -1;
rsp.op_errno = EINVAL;
goto out;
}
if (-1 == rsp.op_ret) {
- gf_log ("", GF_LOG_ERROR,
+ gf_log (THIS->name, GF_LOG_ERROR,
"failed to register the port with glusterd");
goto out;
}