summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2012-08-17 14:19:39 +0530
committerVijay Bellur <vbellur@redhat.com>2012-08-17 02:22:02 -0700
commit753f8c13245220c4b9ec6364a5e644274a36b1d6 (patch)
tree0b2d61200605ef15a25f42b30f75460e8e2beb27 /xlators/cluster/afr/src/afr-self-heal-common.c
parent1df75bc835a75f17fa0fcd3722ef68f05f5f3200 (diff)
afr: Avoid excessive logging in self-heal.v3.3.1qa1
- (Excessive) Logging has been very useful as 'bread-crumbs' in many a root-cause analyses. This patch aims at avoiding logging when the information could be reconstructed using the xattrs, statedump, and/or "volume heal" CLI commands. Change-Id: I8f646cbee44e98495ea6963f9dfcae95375c8900 BUG: 844804 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3827 Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index be8809a5de7..e86f82f402f 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -989,7 +989,7 @@ afr_sh_missing_entries_done (call_frame_t *frame, xlator_t *this)
afr_sh_reset (frame, this);
if (local->govinda_gOvinda) {
- gf_log (this->name, GF_LOG_INFO,
+ gf_log (this->name, GF_LOG_DEBUG,
"split brain found, aborting selfheal of %s",
local->loc.path);
sh->op_failed = 1;
@@ -1081,7 +1081,7 @@ afr_sh_common_lookup_resp_handler (call_frame_t *frame, void *cookie,
sh->success_count++;
sh->xattr[child_index] = dict_ref (xattr);
} else {
- gf_log (this->name, GF_LOG_ERROR, "path %s on subvolume"
+ gf_log (this->name, GF_LOG_DEBUG, "path %s on subvolume"
" %s => -1 (%s)", loc->path,
priv->children[child_index]->name,
strerror (op_errno));
@@ -2152,11 +2152,17 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this)
afr_self_heal_type_str_get (sh, sh_type_str,
sizeof(sh_type_str));
if (sh->op_failed) {
- gf_log (this->name, GF_LOG_ERROR, "background %s self-heal "
+ gf_loglevel_t loglevel = GF_LOG_ERROR;
+ if (priv->shd.iamshd)
+ loglevel = GF_LOG_DEBUG;
+
+ gf_log (this->name, loglevel, "background %s self-heal "
"failed on %s", sh_type_str, local->loc.path);
+
} else {
- gf_log (this->name, GF_LOG_INFO, "background %s self-heal "
+ gf_log (this->name, GF_LOG_DEBUG, "background %s self-heal "
"completed on %s", sh_type_str, local->loc.path);
+
}
FRAME_SU_UNDO (bgsh_frame, afr_local_t);