summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2016-04-15 16:37:18 +0530
committerAravinda VK <avishwan@redhat.com>2016-04-19 23:21:19 -0700
commitbc89311aff62c78102ab6920077b6782ee99689a (patch)
tree3d4fdadb53adae581b3cc1ab6645f1b443c370b8 /xlators
parent690715bb3e341f673a71d1dc8b80bb35aa29c75d (diff)
geo-rep: Fix hostname mismatch between volinfo and geo-rep status
When Volume was created using IP, Gluster Volume info shows IP address But Geo-rep shows hostname if available, So difficult to map the outputs of Volume Info and Georep status output. Schedule Geo-rep script(c#13279) will merge the output of Volume info and Geo-rep status to get offline brick nodes information. This script was failing since host info shown in Volinfo is different from Georep status. Script was showing all nodes as offline. With this patch Geo-rep gets host info from volinfo->bricks instead of getting from hostname. Geo-rep status will now show same hostname/IP which was used in Volume Create. BUG: 1327553 Change-Id: Ib8e56da29129aa19225504a891f9b870f269ab75 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14005 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 4a535b1b5af..3387f7e62bc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -3920,8 +3920,9 @@ fetch_data:
sts_val->master[strlen(master)] = '\0';
/* Master Brick Node */
- memcpy (sts_val->node, node, strlen(node));
- sts_val->node[strlen(node)] = '\0';
+ memcpy (sts_val->node, brickinfo->hostname,
+ strlen(brickinfo->hostname));
+ sts_val->node[strlen(brickinfo->hostname)] = '\0';
/* Master Brick Path */
memcpy (sts_val->brick, brickinfo->path,