summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-07-03 11:34:20 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-08-11 01:19:50 -0700
commit20a50abf548d95af70143dac478935d51af1e1f7 (patch)
tree52e7d53dbb4b15485ad1d8cabe6136c3f7307570 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent5a8dd6f39ec6a536cf13b2758a754947ded16a23 (diff)
glusterd: Do not log failure if glusterd_get_txn_opinfo fails in gluster volume status
Backport of http://review.gluster.org/#/c/11520/ The first RPC call of gluster volume status fetches the list of the volume names from GlusterD and during that time since no volume name is set in the dictionary gluserd_get_txn_opinfo fails resulting into a failure log which is annoying to the user considering this command is triggered frequently. Fix is to have callers log it depending on the need Change-Id: Ib60a56725208182175513c505c61bcb28148b2d0 BUG: 1249461 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11817 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 8ac09daf67a..8b54e6d872a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -244,14 +244,8 @@ glusterd_get_txn_opinfo (uuid_t *txn_id, glusterd_op_info_t *opinfo)
ret = dict_get_bin(priv->glusterd_txn_opinfo,
uuid_utoa (*txn_id),
(void **) &opinfo_obj);
- if (ret) {
- gf_msg_callingfn (this->name, GF_LOG_ERROR, errno,
- GD_MSG_DICT_GET_FAILED,
- "Unable to get transaction opinfo "
- "for transaction ID : %s",
- uuid_utoa (*txn_id));
+ if (ret)
goto out;
- }
(*opinfo) = opinfo_obj->opinfo;
@@ -347,9 +341,11 @@ glusterd_clear_txn_opinfo (uuid_t *txn_id)
ret = glusterd_get_txn_opinfo (txn_id, &txn_op_info);
if (ret) {
- gf_msg (this->name, GF_LOG_ERROR, 0,
+ gf_msg_callingfn (this->name, GF_LOG_ERROR, 0,
GD_MSG_TRANS_OPINFO_GET_FAIL,
- "Transaction opinfo not found");
+ "Unable to get transaction opinfo "
+ "for transaction ID : %s",
+ uuid_utoa (*txn_id));
goto out;
}
@@ -7309,9 +7305,12 @@ glusterd_op_sm ()
ret = glusterd_get_txn_opinfo (&event->txn_id,
&txn_op_info);
if (ret) {
- gf_msg (this->name, GF_LOG_ERROR, 0,
- GD_MSG_TRANS_OPINFO_GET_FAIL,
- "Unable to get transaction's opinfo");
+ gf_msg_callingfn (this->name, GF_LOG_ERROR, 0,
+ GD_MSG_TRANS_OPINFO_GET_FAIL,
+ "Unable to get transaction "
+ "opinfo for transaction ID :"
+ "%s",
+ uuid_utoa (event->txn_id));
glusterd_destroy_op_event_ctx (event);
GF_FREE (event);
continue;