diff options
author | Gaurav Yadav <gyadav@redhat.com> | 2017-07-18 16:23:18 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-07-28 04:47:24 +0000 |
commit | 1477fa442a733d7b1a5ea74884cac8f29fbe7e6a (patch) | |
tree | ac736287b840d9130e0038017bae3d8cd642ab15 /xlators/mgmt/glusterd/src/glusterd-store.c | |
parent | fc0fce2c8f0f4c9ca373fdc754cab6359c9fcdcb (diff) |
glusterd : glusterd fails to start when peer's network interface is down
Problem:
glusterd fails to start on nodes where glusterd tries to come up even
before network is up.
Fix:
On startup glusterd tries to resolve brick path which is based on
hostname/ip, but in the above scenario when network interface is not
up, glusterd is not able to resolve the brick path using ip_address or
hostname With this fix glusterd will use UUID to resolve brick path.
Change-Id: Icfa7b2652417135530479d0aa4e2a82b0476f710
BUG: 1472267
Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
Reviewed-on: https://review.gluster.org/17813
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 2dc35174f95..4b80186fb70 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -372,6 +372,10 @@ glusterd_store_brickinfo_write (int fd, glusterd_brickinfo_t *brickinfo) GF_ASSERT (brickinfo); GF_ASSERT (fd > 0); + ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_BRICK_UUID, + uuid_utoa(brickinfo->uuid)); + if (ret) + goto out; ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_BRICK_HOSTNAME, brickinfo->hostname); if (ret) @@ -2518,6 +2522,9 @@ glusterd_store_retrieve_bricks (glusterd_volinfo_t *volinfo) GLUSTERD_STORE_KEY_BRICK_FSID, strlen (GLUSTERD_STORE_KEY_BRICK_FSID))) { gf_string2uint64 (value, &brickinfo->statfs_fsid); + } else if (!strcmp(key, + GLUSTERD_STORE_KEY_BRICK_UUID)) { + gf_uuid_parse (value, brickinfo->uuid); } else { gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_UNKNOWN_KEY, "Unknown key: %s", |