0820681560
Resolves: bz#1547903 bz#1566336 bz#1568896 bz#1578716 bz#1581047 Resolves: bz#1581231 bz#1582066 bz#1593865 bz#1597506 bz#1597511 Resolves: bz#1597654 bz#1597768 bz#1598105 bz#1598356 bz#1599037 Resolves: bz#1599823 bz#1600057 bz#1601314 Signed-off-by: Milind Changire <mchangir@redhat.com>
71 lines
3.3 KiB
Diff
71 lines
3.3 KiB
Diff
From 058d12fcab16688cd351bd9d409a83cae40c3ea6 Mon Sep 17 00:00:00 2001
|
|
From: Atin Mukherjee <amukherj@redhat.com>
|
|
Date: Tue, 10 Jul 2018 21:33:41 +0530
|
|
Subject: [PATCH 320/325] 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>
|
|
|
|
upstream patch: https://review.gluster.org/#/c/20493/
|
|
|
|
Change-Id: I8b758578f9db90d2974f7c79126c50ad3a001d71
|
|
BUG: 1599823
|
|
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/143744
|
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
---
|
|
xlators/mgmt/glusterd/src/glusterd-utils.c | 17 +++++++++++++++--
|
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
index 565b6c5..95df889 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;
|
|
}
|
|
@@ -1367,6 +1368,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. */
|
|
@@ -1378,8 +1385,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;
|
|
--
|
|
1.8.3.1
|
|
|