a3470f
From 5138cf57c7a61eed4bb33c4fa2e21f6fb7bd56fd Mon Sep 17 00:00:00 2001
a3470f
From: Atin Mukherjee <amukherj@redhat.com>
a3470f
Date: Tue, 20 Feb 2018 18:37:56 +0530
a3470f
Subject: [PATCH 163/180] glusterd: compare uuid instead of hostname while
a3470f
 finding compatible brick
a3470f
a3470f
If the above is not done, bricks created with different IP/hostname will
a3470f
not be compatible with brick multiplexing.
a3470f
a3470f
>upstream mainline patch : https://review.gluster.org/#/c/19601/
a3470f
a3470f
Change-Id: I508eb59b0632df4b48466cca411c7ec6cc6bd577
a3470f
BUG: 1547012
a3470f
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/131110
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 xlators/mgmt/glusterd/src/glusterd-utils.c | 2 +-
a3470f
 1 file changed, 1 insertion(+), 1 deletion(-)
a3470f
a3470f
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
a3470f
index 5deacde..9ccd718 100644
a3470f
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
a3470f
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
a3470f
@@ -5656,7 +5656,7 @@ find_compat_brick_in_vol (glusterd_conf_t *conf,
a3470f
                 if (other_brick == brickinfo) {
a3470f
                         continue;
a3470f
                 }
a3470f
-                if (strcmp (brickinfo->hostname, other_brick->hostname) != 0) {
a3470f
+                if (gf_uuid_compare (brickinfo->uuid, other_brick->uuid)) {
a3470f
                         continue;
a3470f
                 }
a3470f
                 if (other_brick->status != GF_BRICK_STARTED &&
a3470f
-- 
a3470f
1.8.3.1
a3470f