diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2012-12-11 21:45:46 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-01-18 13:24:17 -0800 |
commit | 1ad17d69832369acf6177c378ddd8053174e8b6e (patch) | |
tree | b049793e4f7cd6a029d7d468f39c8aefda8f256c /xlators/mgmt/glusterd/src/glusterd-store.c | |
parent | a2b85d13e50327da721e32071aecad21b10ffb1a (diff) |
glusterd: log changes in volume stop (and in op sm codepath)
This patch makes log changes mostly in the op state machine as also
in volume stop codepath of glusterd.
Changes made:
* Moved log level from INFO to DEBUG, of log messages on the various
state transitions within a transaction.
For example, messages of the following kind:
a. "Sent op req to <n> peers"
b. "Received LOCK from uuid: <peer-uuid>", etc.
* Changed some of the log messages to give as much information as
available in case of failure.
* Added logs to identify on which machine lock/stage/commit failed.
* Quite a few s/THIS/this changes.
Also, with this change, log changes in all other volume ops
should (hopefully) boil down to modifying the respective logs in
handler, stage and commit (and brick ops in some cases).
Change-Id: I2b8443042b07fb41a1d12033741f7e156aa6b3da
BUG: 812356
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4382
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index bbca016ebbc..6f67a1bfc80 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -450,11 +450,14 @@ glusterd_store_delete_brick (glusterd_volinfo_t *volinfo, char brickpath[PATH_MAX] = {0,}; char *ptr = NULL; char *tmppath = NULL; + xlator_t *this = NULL; + this = THIS; + GF_ASSERT (this); GF_ASSERT (volinfo); GF_ASSERT (brickinfo); - priv = THIS->private; + priv = this->private; GF_ASSERT (priv); @@ -477,8 +480,8 @@ glusterd_store_delete_brick (glusterd_volinfo_t *volinfo, ret = unlink (brickpath); if ((ret < 0) && (errno != ENOENT)) { - gf_log ("", GF_LOG_ERROR, "Unlink failed on %s, reason: %s", - brickpath, strerror(errno)); + gf_log (this->name, GF_LOG_ERROR, "Unlink failed on %s, " + "reason: %s", brickpath, strerror(errno)); ret = -1; goto out; } else { @@ -490,7 +493,7 @@ out: glusterd_store_handle_destroy (brickinfo->shandle); brickinfo->shandle = NULL; } - gf_log ("", GF_LOG_DEBUG, "Returning with %d", ret); + gf_log (this->name, GF_LOG_DEBUG, "Returning with %d", ret); return ret; } |