summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2013-02-12 17:26:35 +0530
committerAnand Avati <avati@redhat.com>2013-04-09 17:39:30 -0700
commitc9800f0986a10bbde9121239590e3cb25b94c5f8 (patch)
treeee6045c86cae871472131c96fef90003e395575f /xlators/mgmt/glusterd/src/glusterd-replace-brick.c
parentf364d542aaf272c14b1d6ef7c9ac805db0fdb45c (diff)
glusterd: changes in 'volume create' behaviour
This patch incorporates all the changes suggested on the behaviour of 'volume create' command in http://review.gluster.org/#change,4214 (comment #14, to be precise). Change-Id: Iaac524a59738b177415595b18aa8a136090d3d25 BUG: 948729 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4740 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-replace-brick.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 36f0b10dc6f..0afe2203c85 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -213,6 +213,7 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
char pidfile[PATH_MAX] = {0};
char *task_id_str = NULL;
xlator_t *this = NULL;
+ gf_boolean_t is_force = _gf_false;
this = THIS;
GF_ASSERT (this);
@@ -349,6 +350,8 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
ret = 0;
}
}
+ is_force = dict_get_str_boolean (dict, "force", _gf_false);
+
break;
case GF_REPLACE_OP_PAUSE:
@@ -383,7 +386,9 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
}
break;
- case GF_REPLACE_OP_COMMIT_FORCE: break;
+ case GF_REPLACE_OP_COMMIT_FORCE:
+ is_force = _gf_true;
+ break;
case GF_REPLACE_OP_STATUS:
@@ -507,9 +512,9 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
if (!glusterd_is_rb_ongoing (volinfo) &&
glusterd_is_local_addr (host)) {
- ret = glusterd_brick_create_path (host, path,
+ ret = glusterd_validate_and_create_brickpath (dst_brickinfo,
volinfo->volume_id,
- op_errstr);
+ op_errstr, is_force);
if (ret)
goto out;
}