summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-10-27 16:04:46 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2017-11-02 09:52:58 +0000
commit9e3244cd177f7ddd4f9697e07bd119e2becb982d (patch)
tree8402796703a1c5c1030bf4a964c4bdd1c3406c8f /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent80fbfef5c70b67838a391041e80a67e41c9142b6 (diff)
glusterd: persist brickinfo's port change into glusterd's store
Problem: Consider a case where node reboot is performed and prior to reboot brick was listening to 49153. Post reboot glusterd assigned 49152 to brick and started the brick process but the new port was never persisted. Now when glusterd restarts glusterd always read the port from its persisted store i.e 49153 however pmap signin happens with the correct port i.e 49152. Fix: Make sure when glusterd_brick_start is called, glusterd_store_volinfo is eventually invoked. Change-Id: Ic0efbd48c51d39729ed951a42922d0e59f7115a1 BUG: 1507748 Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 7bb3d537097..83680cf7a7a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2416,7 +2416,13 @@ glusterd_start_bricks (glusterd_volinfo_t *volinfo)
goto out;
}
}
-
+ ret = glusterd_store_volinfo (volinfo, GLUSTERD_VOLINFO_VER_AC_NONE);
+ if (ret) {
+ gf_msg (THIS->name, GF_LOG_ERROR, 0, GD_MSG_VOLINFO_STORE_FAIL,
+ "Failed to write volinfo for volume %s",
+ volinfo->volname);
+ goto out;
+ }
ret = 0;
out:
return ret;