diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-01-03 14:44:01 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-28 09:44:19 -0700 |
commit | 26843b00447cc14427b4f02ca136033b56ca093f (patch) | |
tree | 57ed6cc0b4fc3bbbad34ed427a88880760ff38b2 /xlators/cluster | |
parent | 07ed48398e41df1b65202f3d2e0be6f2c3ca8ceb (diff) |
heal: Enable logging for glfsheal.
logs will be written to <log-dir>/glfsheal-<volname>.log
Moved some non-essential frequent logs to DEBUG.
BUG: 1039544
Change-Id: I2aceda6e3092f8c5052e7a4b8b5dec3cdeebd9a9
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7481
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 4 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 3 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 7dafa0529fa..1e57ebb9d7c 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2292,7 +2292,7 @@ afr_set_root_inode_on_first_lookup (afr_local_t *local, xlator_t *this, goto out; priv = this->private; if ((priv->first_lookup)) { - gf_log (this->name, GF_LOG_INFO, "added root inode"); + gf_log (this->name, GF_LOG_DEBUG, "added root inode"); priv->root_inode = inode_ref (inode); priv->first_lookup = 0; } @@ -2353,7 +2353,7 @@ afr_discovery_cbk (call_frame_t *frame, void *cookie, xlator_t *this, */ if (is_local) { child_index = (int32_t)(long)cookie; - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_DEBUG, "selecting local read_child %s", priv->children[child_index]->name); priv->read_child = child_index; diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index ab9e44b41e0..4916bf45d68 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2346,6 +2346,9 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this) loglevel = GF_LOG_DEBUG; } + if (sh->dry_run) + loglevel = GF_LOG_DEBUG; + afr_log_self_heal_completion_status (local, loglevel); FRAME_SU_UNDO (bgsh_frame, afr_local_t); diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 5c53f6a6a06..02c91c95710 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -947,7 +947,7 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this) afr_sh_mark_source_sinks (frame, this); if (sh->active_sinks == 0) { - gf_log (this->name, GF_LOG_INFO, + gf_log (this->name, GF_LOG_DEBUG, "no active sinks for performing self-heal on file %s", local->loc.path); afr_sh_data_finish (frame, this); @@ -1171,7 +1171,7 @@ afr_sh_data_fstat_cbk (call_frame_t *frame, void *cookie, * the pending data xattrs which need to be erased */ if (!afr_sh_data_proceed (sh->success_count)) { - gf_log (this->name, GF_LOG_ERROR, "inspecting metadata " + gf_log (this->name, GF_LOG_DEBUG, "inspecting metadata " "succeeded on < %d children, aborting " "self-heal for %s", AFR_SH_MIN_PARTICIPANTS, local->loc.path); @@ -1283,7 +1283,7 @@ afr_sh_data_fxattrop_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) { if (!afr_sh_data_proceed (sh->success_count)) { - gf_log (this->name, GF_LOG_ERROR, "%s, inspecting " + gf_log (this->name, GF_LOG_DEBUG, "%s, inspecting " "change log succeeded on < %d children", local->loc.path, AFR_SH_MIN_PARTICIPANTS); afr_sh_data_fail (frame, this); |