diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2016-03-03 12:24:49 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2016-03-03 03:35:35 -0800 |
commit | 92273862decac2282b7f2a9183df3f139e5629a5 (patch) | |
tree | 9bac1a30da4e7299eba351cd57c2ab144cb70396 /xlators | |
parent | 14609729da9ed8f76be6ff0ce5d6a6b278af6e8d (diff) |
glusterd: Avoid ret value of glusterd_resolve_brick in retreive brick path
In glusterd_store_retrieve_bricks() commit a60c39d introduced
glusterd_resolve_brick () call to resolve all the bricks which is incorrect
since by the time peerinfo list may not be constructed. The requirement here was
to get the local brick's uuid populated and match that with MY_UUID.
Fix is to overlook the return code of glusterd_resolve_brick() to ensure that
the failure in resolving non local bricks are genuine and expected.
Change-Id: I22822ae5b4e96fe4eacd50ea5c41e58061557106
BUG: 1313901
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/13588
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.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>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 7c8bc545f6d..21cbdb8b2b9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -2402,9 +2402,12 @@ glusterd_store_retrieve_bricks (glusterd_volinfo_t *volinfo) GLUSTERD_ASSIGN_BRICKID_TO_BRICKINFO (brickinfo, volinfo, brickid++); } - ret = glusterd_resolve_brick (brickinfo); - if (ret) - goto out; + /* By now if the brick is a local brick then it will be able to + * resolve which is the only thing we want now for checking + * whether the brickinfo->uuid matches with MY_UUID for realpath + * check. Hence do not handle error + */ + (void)glusterd_resolve_brick (brickinfo); if (!gf_uuid_compare(brickinfo->uuid, MY_UUID)) { if (!realpath (brickinfo->path, abspath)) { gf_msg (this->name, GF_LOG_CRITICAL, errno, |