diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2013-09-13 13:30:29 +0530 |
---|---|---|
committer | Krutika Dhananjay <kdhananj@redhat.com> | 2013-09-13 16:24:07 +0530 |
commit | 34ffc3b71ad96b9be6fa34cad44f92eceb56f5e7 (patch) | |
tree | 069ad989228793159ad9425fd4b91f0daeac96fb | |
parent | f802270c87186032d3228fcd4899506728ace0b6 (diff) |
glusterd: Relax op-version check in quota command
This is to set default-soft-limit as a way of bumping up
the op-version, as part of post-upgrade script before
setting limits.
Change-Id: I6693bf6a6d7f761c55f83120cf686ffa0951bd50
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-quota.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index e4c654b9..3bcf54b5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -102,16 +102,6 @@ __glusterd_handle_quota (rpcsvc_request_t *req) goto out; } - if ((conf->op_version == GD_OP_VERSION_MIN) && - (type > GF_QUOTA_OPTION_TYPE_VERSION)) { - snprintf (msg, sizeof (msg), "Cannot execute command. The " - "cluster is operating at version 1. Executing command " - "%s is disallowed in this state", - gd_quota_op_list[type]); - ret = -1; - goto out; - } - ret = glusterd_op_begin_synctask (req, GD_OP_QUOTA, dict); out: @@ -1106,17 +1096,6 @@ glusterd_op_quota (dict_t *dict, char **op_errstr, dict_t *rsp_dict) ret = dict_get_int32 (dict, "type", &type); - if ((priv->op_version == GD_OP_VERSION_MIN) && - (type > GF_QUOTA_OPTION_TYPE_VERSION)) { - gf_asprintf (op_errstr, "Volume quota failed. The cluster is " - "operating at version %d. Option %s " - "is disallowed in this state.", - priv->op_version, - gd_quota_op_list[type]); - ret = -1; - goto out; - } - switch (type) { case GF_QUOTA_OPTION_TYPE_ENABLE: ret = glusterd_quota_enable (volinfo, op_errstr, @@ -1363,17 +1342,6 @@ glusterd_op_stage_quota (dict_t *dict, char **op_errstr, dict_t *rsp_dict) goto out; } - if ((priv->op_version == GD_OP_VERSION_MIN) && - (type > GF_QUOTA_OPTION_TYPE_VERSION)) { - gf_asprintf (op_errstr, "Volume quota failed. The cluster is " - "operating at version %d. Option %s " - "is disallowed in this state.", - priv->op_version, - gd_quota_op_list[type]); - ret = -1; - goto out; - } - ctx = glusterd_op_get_ctx(); if (ctx && (type == GF_QUOTA_OPTION_TYPE_ENABLE || type == GF_QUOTA_OPTION_TYPE_LIST)) { |