summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-04-13 02:42:12 +0100
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-04-22 07:51:03 -0700
commit86b02afab780e559e82399b9e96381d8df594ed6 (patch)
treee59242b087191dfb6af7b302b18a59206a9cd17c /cli/src/cli-cmd-volume.c
parentabbc525dd3cbe142753c5b44a2717c1ed6b26723 (diff)
glusterd: support for tier volumes 'detach start' and 'detach commit'
These commands work in a manner analagous to rebalancing when removing a brick. The existing migration daemon detects "detach start" and switches to moving data off the hot tier. While in this state all lookups are directed to the cold tier. gluster v detach-tier <vol> start gluster v detach-tier <vol> commit The status and stop cli commands shall be submitted separately. Change-Id: I24fda5cc3ba74f5fb8aa9a3234ad51f18b80a8a0 BUG: 1205540 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: root <root@localhost.localdomain> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/10108 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index ae091b3182e..8b73c2e7840 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -915,26 +915,16 @@ cli_cmd_volume_detach_tier_cbk (struct cli_state *state,
const char *question = "Removing tier can result in data loss. "
"Do you want to Continue?";
- if (wordcount != 3)
- goto out;
-
frame = create_frame (THIS, THIS->ctx->pool);
if (!frame)
goto out;
- options = dict_new ();
- if (!options)
- goto out;
+ ret = cli_cmd_volume_detach_tier_parse(words, wordcount, &options);
- ret = dict_set_int32 (options, "force", 1);
if (ret)
goto out;
- ret = dict_set_int32 (options, "command", GF_OP_CMD_DETACH);
- if (ret)
- goto out;
-
- ret = dict_set_str (options, "volname", (char *)words[2]);
+ ret = dict_set_int32 (options, "force", 1);
if (ret)
goto out;
@@ -2563,7 +2553,8 @@ struct cli_cmd volume_cmds[] = {
cli_cmd_volume_attach_tier_cbk,
"attach tier to volume <VOLNAME>"},
- { "volume detach-tier <VOLNAME>",
+ { "volume detach-tier <VOLNAME> "
+ " <start|stop|status|commit|[force]>",
cli_cmd_volume_detach_tier_cbk,
"detach tier from volume <VOLNAME>"},