|
|
12a457 |
From 560ea705840a25f7ff09db499c23e2c20e306c9f Mon Sep 17 00:00:00 2001
|
|
|
12a457 |
From: Aravinda VK <avishwan@redhat.com>
|
|
|
12a457 |
Date: Fri, 15 Apr 2016 16:37:18 +0530
|
|
|
12a457 |
Subject: [PATCH 087/104] geo-rep: Fix hostname mismatch between volinfo and geo-rep status
|
|
|
12a457 |
|
|
|
12a457 |
When Volume was created using IP, Gluster Volume info shows IP address
|
|
|
12a457 |
But Geo-rep shows hostname if available, So difficult to map the outputs
|
|
|
12a457 |
of Volume Info and Georep status output.
|
|
|
12a457 |
|
|
|
12a457 |
Schedule Geo-rep script(c#13279) will merge the output of Volume info and
|
|
|
12a457 |
Geo-rep status to get offline brick nodes information. This script was
|
|
|
12a457 |
failing since host info shown in Volinfo is different from Georep status.
|
|
|
12a457 |
Script was showing all nodes as offline.
|
|
|
12a457 |
|
|
|
12a457 |
With this patch Geo-rep gets host info from volinfo->bricks instead of
|
|
|
12a457 |
getting from hostname. Geo-rep status will now show same hostname/IP which
|
|
|
12a457 |
was used in Volume Create.
|
|
|
12a457 |
|
|
|
12a457 |
BUG: 1327552
|
|
|
12a457 |
Change-Id: Ib8e56da29129aa19225504a891f9b870f269ab75
|
|
|
12a457 |
Signed-off-by: Aravinda VK <avishwan@redhat.com>
|
|
|
12a457 |
Reviewed-on: http://review.gluster.org/14005
|
|
|
12a457 |
Smoke: Gluster Build System <jenkins@build.gluster.com>
|
|
|
12a457 |
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
|
|
|
12a457 |
Reviewed-by: Kotresh HR <khiremat@redhat.com>
|
|
|
12a457 |
Reviewed-on: http://review.gluster.org/14036
|
|
|
12a457 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/73026
|
|
|
12a457 |
---
|
|
|
12a457 |
xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 5 +++--
|
|
|
12a457 |
1 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
12a457 |
|
|
|
12a457 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
|
|
|
12a457 |
index 5a61c68..27a89b0 100644
|
|
|
12a457 |
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
|
|
|
12a457 |
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
|
|
|
12a457 |
@@ -3925,8 +3925,9 @@ fetch_data:
|
|
|
12a457 |
sts_val->master[strlen(master)] = '\0';
|
|
|
12a457 |
|
|
|
12a457 |
/* Master Brick Node */
|
|
|
12a457 |
- memcpy (sts_val->node, node, strlen(node));
|
|
|
12a457 |
- sts_val->node[strlen(node)] = '\0';
|
|
|
12a457 |
+ memcpy (sts_val->node, brickinfo->hostname,
|
|
|
12a457 |
+ strlen(brickinfo->hostname));
|
|
|
12a457 |
+ sts_val->node[strlen(brickinfo->hostname)] = '\0';
|
|
|
12a457 |
|
|
|
12a457 |
/* Master Brick Path */
|
|
|
12a457 |
memcpy (sts_val->brick, brickinfo->path,
|
|
|
12a457 |
--
|
|
|
12a457 |
1.7.1
|
|
|
12a457 |
|