From ae1a2902c2193cac46813728cdfde6227f8e0379 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 27 Feb 2013 14:21:04 +0530 Subject: mgmt/glusterd: Move found-brick logs to DEBUG Change-Id: I1c311c21d7bdcad4956d3428bda39131c331cd7a BUG: 812356 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4585 Reviewed-by: Krutika Dhananjay Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 6 ++++-- xlators/mgmt/glusterd/src/glusterd-utils.c | 9 +++++++-- xlators/mgmt/glusterd/src/glusterd.h | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 1c1ad1bf8..6a56432d1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -794,7 +794,9 @@ glusterd_handle_remove_brick (rpcsvc_request_t *req) continue; } - gf_log (this->name, GF_LOG_INFO, "Found brick"); + gf_log (this->name, GF_LOG_DEBUG, LOGSTR_FOUND_BRICK, + brickinfo->hostname, brickinfo->path, + volinfo->volname); if (!sub_volume && (volinfo->dist_leaf_count > 1)) { sub_volume = (pos / volinfo->dist_leaf_count) + 1; sub_volume_start = (volinfo->dist_leaf_count * @@ -805,7 +807,7 @@ glusterd_handle_remove_brick (rpcsvc_request_t *req) if (pos < sub_volume_start || pos >sub_volume_end) { ret = -1; - snprintf (err_str, sizeof (err_str), + snprintf (err_str, sizeof (err_str), "Bricks not from same subvol " "for %s", vol_type); gf_log (this->name, GF_LOG_ERROR, diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 54c095eec..64f45f247 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -932,6 +932,9 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path, glusterd_brickinfo_t *brickiter = NULL; uuid_t peer_uuid = {0}; int32_t ret = -1; + xlator_t *this = NULL; + + this = THIS; if (uuid) { uuid_copy (peer_uuid, uuid); @@ -950,7 +953,9 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path, continue; if (strcmp (brickiter->path, path) == 0) { - gf_log (THIS->name, GF_LOG_INFO, "Found brick"); + gf_log (this->name, GF_LOG_DEBUG, LOGSTR_FOUND_BRICK, + brickiter->hostname, brickiter->path, + volinfo->volname); ret = 0; if (brickinfo) *brickinfo = brickiter; @@ -959,7 +964,7 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path, } out: - gf_log ("", GF_LOG_DEBUG, "Returning %d", ret); + gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret); return ret; } diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 4af59ef2e..a2067250c 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -52,6 +52,7 @@ #define FMTSTR_CHECK_VOL_EXISTS "Volume %s does not exist" #define FMTSTR_RESOLVE_BRICK "Could not find peer on which brick %s:%s resides" +#define LOGSTR_FOUND_BRICK "Found brick %s:%s in volume %s" #define LOGSTR_BUILD_PAYLOAD "Failed to build payload for operation 'Volume %s'" #define LOGSTR_STAGE_FAIL "Staging of operation 'Volume %s' failed on %s %s %s" #define LOGSTR_COMMIT_FAIL "Commit of operation 'Volume %s' failed on %s %s %s" -- cgit