summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-03-30 14:27:44 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-04-08 07:28:21 +0000
commita8260044291cb6eee44974d8c52caa9f4cfb3993 (patch)
tree3b9b0f83bd6ae869a26a75dafdc988196a62d049 /cli/src
parentf0cd1d73c63001740cd7691a77df7631c9b8e8dc (diff)
glusterd: Support distributed replicated volumes on hot tier
We did not set up the graph properly for hot tiers with replicated subvolumes. Also add check that the file has not already been moved by another replicated brick on the same node. Change-Id: I9adef565ab60f6774810962d912168b77a6032fa BUG: 1206517 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/10054 Reviewed-by: Joseph Fernandes <josferna@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-cmd-parser.c5
-rw-r--r--cli/src/cli-cmd-volume.c7
-rw-r--r--cli/src/cli.h2
3 files changed, 9 insertions, 5 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 7c03ae228fd..a334fd931bf 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -1441,7 +1441,7 @@ out:
int32_t
cli_cmd_volume_add_brick_parse (const char **words, int wordcount,
- dict_t **options)
+ dict_t **options, int *ret_type)
{
dict_t *dict = NULL;
char *volname = NULL;
@@ -1559,6 +1559,9 @@ parse_bricks:
*options = dict;
out:
+ if (ret_type)
+ *ret_type = type;
+
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse add-brick CLI");
if (dict)
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 5436c76bcc2..9c61c3f541f 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -787,7 +787,7 @@ cli_cmd_volume_add_brick_cbk (struct cli_state *state,
if (!frame)
goto out;
- ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options);
+ ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options, 0);
if (ret) {
cli_usage_out (word->pattern);
parse_error = 1;
@@ -847,12 +847,13 @@ cli_cmd_volume_attach_tier_cbk (struct cli_state *state,
int parse_error = 0;
gf_answer_t answer = GF_ANSWER_NO;
cli_local_t *local = NULL;
+ int type = 0;
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
goto out;
- ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options);
+ ret = cli_cmd_volume_add_brick_parse (words, wordcount, &options, &type);
if (ret) {
cli_usage_out (word->pattern);
parse_error = 1;
@@ -872,7 +873,7 @@ cli_cmd_volume_attach_tier_cbk (struct cli_state *state,
if (ret)
goto out;
- ret = dict_set_int32 (options, "type", GF_CLUSTER_TYPE_TIER);
+ ret = dict_set_int32 (options, "type", type);
if (ret)
goto out;
diff --git a/cli/src/cli.h b/cli/src/cli.h
index ed2bc4aba8a..60bbcb9f620 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -249,7 +249,7 @@ cli_cmd_ganesha_parse (struct cli_state *state, const char **words,
int32_t
cli_cmd_volume_add_brick_parse (const char **words, int wordcount,
- dict_t **options);
+ dict_t **options, int *type);
int32_t
cli_cmd_volume_remove_brick_parse (const char **words, int wordcount,