summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2018-07-10 21:33:41 +0530
committerAmar Tumballi <amarts@redhat.com>2018-07-11 04:14:07 +0000
commit2e18269a80f5f0f0d8d28813aaf216cdb4477a9a (patch)
tree474638afa44bb6bb48c19576db7b779dfc4bed89 /xlators
parent69f77d28c3ecacba77fbae2f789b5110641347f3 (diff)
glusterd: log improvements on brick creation validation
Added few log entries in glusterd_is_brickpath_available (). Change-Id: I8b758578f9db90d2974f7c79126c50ad3a001d71 Updates: bz#1193929 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 385df1ea01b..45fb4c67e87 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1282,7 +1282,8 @@ glusterd_brickinfo_new_from_brick (char *brick,
GD_MSG_BRICKINFO_CREATE_FAIL, "realpath"
" () failed for brick %s. The "
"underlying filesystem may be in bad "
- "state", new_brickinfo->path);
+ "state. Error - %s",
+ new_brickinfo->path, strerror(errno));
ret = -1;
goto out;
}
@@ -1358,6 +1359,12 @@ glusterd_is_brickpath_available (uuid_t uuid, char *path)
/* path may not yet exist */
if (!realpath (path, tmp_path)) {
if (errno != ENOENT) {
+ gf_msg (THIS->name, GF_LOG_CRITICAL, errno,
+ GD_MSG_BRICKINFO_CREATE_FAIL, "realpath"
+ " () failed for brick %s. The "
+ "underlying filesystem may be in bad "
+ "state. Error - %s",
+ path, strerror(errno));
goto out;
}
/* When realpath(3) fails, tmp_path is undefined. */
@@ -1369,8 +1376,14 @@ glusterd_is_brickpath_available (uuid_t uuid, char *path)
brick_list) {
if (gf_uuid_compare (uuid, brickinfo->uuid))
continue;
- if (_is_prefix (brickinfo->real_path, tmp_path))
+ if (_is_prefix (brickinfo->real_path, tmp_path)) {
+ gf_msg (THIS->name, GF_LOG_CRITICAL, 0,
+ GD_MSG_BRICKINFO_CREATE_FAIL,
+ "_is_prefix call failed for brick %s "
+ "against brick %s", tmp_path,
+ brickinfo->real_path);
goto out;
+ }
}
}
available = _gf_true;