summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-05-11 18:24:40 +0530
committerKaushal M <kaushal@redhat.com>2016-05-20 02:33:20 -0700
commit93b72a135a7793b5b71c0eb6498c5fe529827ca6 (patch)
treefb06f67c5e69acd2d16a9b01939b57882ddd11ad /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent4aa4eee079487061b620393e5058a84021259ad7 (diff)
glusterd: copy real_path from older brickinfo during brick import
Backport of http://review.gluster.org/14306 In glusterd_import_new_brick () new_brickinfo->real_path will not be populated for the first time and hence if the underlying file system is bad for the same brick, import will fail resulting in inconsistent configuration data. Fix is to populate real_path from old brickinfo object. Also there were many cases where we were unnecessarily calling realpath() and that may cause in failure. For eg - if a remove brick is executed with a brick whoose underlying file system has crashed, remove-brick fails since realpath() call fails. We'd need to call realpath() here as the value is of no use.Hence passing construct_realpath as _gf_false in glusterd_volume_brickinfo_get_by_brick () is a must in such cases. Change-Id: I7ec93871dc9e616f5d565ad5e540b2f1cacaf9dc BUG: 1337113 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14306 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/14410
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 722817a462b..b5cc301c916 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1729,7 +1729,7 @@ glusterd_op_stage_status_volume (dict_t *dict, char **op_errstr)
ret = glusterd_volume_brickinfo_get_by_brick (brick, volinfo,
&brickinfo,
- _gf_true);
+ _gf_false);
if (ret) {
snprintf (msg, sizeof(msg), "No brick %s in"
" volume %s", brick, volname);
@@ -3247,7 +3247,7 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
ret = glusterd_volume_brickinfo_get_by_brick (brick,
volinfo,
&brickinfo,
- _gf_true);
+ _gf_false);
if (ret)
goto out;
@@ -5829,7 +5829,7 @@ glusterd_bricks_select_remove_brick (dict_t *dict, char **op_errstr,
ret = glusterd_volume_brickinfo_get_by_brick (brick, volinfo,
&brickinfo,
- _gf_true);
+ _gf_false);
if (ret)
goto out;
@@ -6689,7 +6689,7 @@ glusterd_bricks_select_status_volume (dict_t *dict, char **op_errstr,
ret = glusterd_volume_brickinfo_get_by_brick (brickname,
volinfo,
&brickinfo,
- _gf_true);
+ _gf_false);
if (ret)
goto out;