summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-02-27 14:21:04 +0530
committerVijay Bellur <vbellur@redhat.com>2013-02-27 03:55:22 -0800
commitae1a2902c2193cac46813728cdfde6227f8e0379 (patch)
tree2e74847c7b78de0351f4cf8548b8e26fc5d3706e
parentdc8d19148a7cf16ead0eed60fe76e64a03391270 (diff)
mgmt/glusterd: Move found-brick logs to DEBUG
Change-Id: I1c311c21d7bdcad4956d3428bda39131c331cd7a BUG: 812356 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4585 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h1
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"