summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-10-03 15:30:10 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-10-31 02:24:49 +0000
commit733139551322e49e7e5617356cf96e30780d2749 (patch)
treefaa4ef5f75a77b0ef5a4bdab4f5884db2730f1db /cli
parent19775e0445411cca9ddd9d294fd54d0b6fbe6a03 (diff)
stripe: remove the translator from build and glusterd
Based on the proposal to remove few features as they are not actively maintained [1], removing stripe translator from the build. Also make sure there are no regression tests involving stripe translator. [1] https://lists.gluster.org/pipermail/gluster-users/2018-July/034400.html Note that this patch aims at removing the translator from build, and a followup patch is needed to remove the code from repository. Updates: bz#1364707 Change-Id: I235b305338f138e29e9f30cba65bc0dadbebbbd5 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c72
-rw-r--r--cli/src/cli-rpc-ops.c12
2 files changed, 7 insertions, 77 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index bbed960efbf..c6d6232b638 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -392,21 +392,11 @@ cli_validate_disperse_volume(char *word, gf1_cluster_type type,
ret = 2;
}
break;
- case GF_CLUSTER_TYPE_STRIPE_REPLICATE:
- cli_err(
- "striped-replicated-dispersed volume "
- "is not supported");
- goto out;
case GF_CLUSTER_TYPE_TIER:
cli_err(
"tier-dispersed volume is not "
"supported");
goto out;
- case GF_CLUSTER_TYPE_STRIPE:
- cli_err(
- "striped-dispersed volume is not "
- "supported");
- goto out;
case GF_CLUSTER_TYPE_REPLICATE:
cli_err(
"replicated-dispersed volume is not "
@@ -550,8 +540,8 @@ cli_cmd_volume_create_parse(struct cli_state *state, const char **words,
type = GF_CLUSTER_TYPE_REPLICATE;
break;
case GF_CLUSTER_TYPE_STRIPE:
- type = GF_CLUSTER_TYPE_STRIPE_REPLICATE;
- break;
+ cli_err("stripe option not supported");
+ goto out;
case GF_CLUSTER_TYPE_TIER:
cli_err(
"replicated-tiered volume is not "
@@ -637,49 +627,8 @@ cli_cmd_volume_create_parse(struct cli_state *state, const char **words,
goto out;
} else if ((strcmp(w, "stripe")) == 0) {
- switch (type) {
- case GF_CLUSTER_TYPE_STRIPE_REPLICATE:
- case GF_CLUSTER_TYPE_STRIPE:
- cli_err("stripe option given twice");
- goto out;
- case GF_CLUSTER_TYPE_NONE:
- type = GF_CLUSTER_TYPE_STRIPE;
- break;
- case GF_CLUSTER_TYPE_REPLICATE:
- type = GF_CLUSTER_TYPE_STRIPE_REPLICATE;
- break;
- case GF_CLUSTER_TYPE_DISPERSE:
- cli_err(
- "striped-dispersed volume is not "
- "supported");
- goto out;
- case GF_CLUSTER_TYPE_TIER:
- cli_err(
- "striped-tier volume is not "
- "supported");
- goto out;
- default:
- cli_err("Invalid type given");
- goto out;
- }
- if (wordcount < (index + 2)) {
- ret = -1;
- goto out;
- }
- stripe_count = strtol(words[index + 1], NULL, 0);
- if (stripe_count < 2) {
- cli_err(
- "stripe count should be greater"
- " than 1");
- ret = -1;
- goto out;
- }
- ret = dict_set_int32(dict, "stripe-count", stripe_count);
- if (ret)
- goto out;
-
- index += 2;
-
+ cli_err("stripe option not supported");
+ goto out;
} else if ((strcmp(w, "transport")) == 0) {
if (trans_type) {
cli_err(
@@ -1867,17 +1816,8 @@ cli_cmd_volume_add_brick_parse(struct cli_state *state, const char **words,
}
}
} else if ((strcmp(w, "stripe")) == 0) {
- type = GF_CLUSTER_TYPE_STRIPE;
- count = strtol(words[4], NULL, 0);
- if (!count || (count < 2)) {
- cli_err("stripe count should be greater than 1");
- ret = -1;
- goto out;
- }
- ret = dict_set_int32(dict, "stripe-count", count);
- if (ret)
- goto out;
- index = 5;
+ cli_err("stripe option not supported");
+ goto out;
} else {
GF_ASSERT(!"opword mismatch");
ret = -1;
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index f03c5813ee5..e7cca8d2e00 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -694,17 +694,7 @@ gf_cli_print_number_of_bricks(int type, int brick_count, int dist_count,
int disperse_count, int redundancy_count,
int arbiter_count)
{
- if (type == GF_CLUSTER_TYPE_STRIPE_REPLICATE) {
- if (arbiter_count == 0) {
- cli_out("Number of Bricks: %d x %d x %d = %d",
- (brick_count / dist_count), stripe_count, replica_count,
- brick_count);
- } else {
- cli_out("Number of Bricks: %d x %d x (%d + %d) = %d",
- (brick_count / dist_count), stripe_count,
- replica_count - arbiter_count, arbiter_count, brick_count);
- }
- } else if (type == GF_CLUSTER_TYPE_NONE || type == GF_CLUSTER_TYPE_TIER) {
+ if (type == GF_CLUSTER_TYPE_NONE || type == GF_CLUSTER_TYPE_TIER) {
cli_out("Number of Bricks: %d", brick_count);
} else if (type == GF_CLUSTER_TYPE_DISPERSE) {
cli_out("Number of Bricks: %d x (%d + %d) = %d",