summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 9c3373282..3f01dc5da 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1220,6 +1220,9 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count,
if (ret)
goto out;
+ ret = glusterd_resolve_brick (brickinfo);
+ if (ret)
+ goto out;
list_add_tail (&brickinfo->brick_list, &volinfo->bricks);
brick = strtok_r (NULL, " \n", &saveptr);
i++;
@@ -1558,6 +1561,9 @@ glusterd_op_create_volume (gd1_mgmt_stage_op_req *req, char **op_errstr)
if (ret)
goto out;
+ ret = glusterd_resolve_brick (brickinfo);
+ if (ret)
+ goto out;
list_add_tail (&brickinfo->brick_list, &volinfo->bricks);
brick = strtok_r (NULL, " \n", &saveptr);
i++;
@@ -2521,6 +2527,11 @@ glusterd_op_replace_brick (gd1_mgmt_stage_op_req *req, dict_t *rsp_dict)
goto out;
}
+ ret = glusterd_resolve_brick (dst_brickinfo);
+ if (ret) {
+ gf_log ("", GF_LOG_DEBUG, "Unable to resolve dst-brickinfo");
+ goto out;
+ }
/* Set src-brick's port number to be used in the maintainance mount
* after all commit acks are received.
*/
@@ -3755,6 +3766,12 @@ glusterd_do_replace_brick (void *data)
goto out;
}
+ ret = glusterd_resolve_brick (dst_brickinfo);
+ if (ret) {
+ gf_log ("", GF_LOG_DEBUG, "Unable to resolve dst-brickinfo");
+ goto out;
+ }
+
ret = dict_get_int32 (dict, "src-brick-port", &src_port);
if (ret) {
gf_log ("", GF_LOG_ERROR, "Unable to get src-brick port");