diff options
author | Samikshan Bairagya <samikshan@gmail.com> | 2017-07-18 21:33:45 +0530 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-07-19 20:17:27 +0000 |
commit | acdbdaeba222e9ffeae077485681e5101c48d107 (patch) | |
tree | fdc658eb331a589d3f177b6468593d31e670b9f7 /xlators/mgmt/glusterd/src/glusterd-volume-set.c | |
parent | 33db9aff1deaa028f30516e49fdb1e8d6e31bb73 (diff) |
glusterd: Set default value for cluster.max-bricks-per-process to 0
When brick-multiplexing is enabled, and
"cluster.max-bricks-per-process" isn't explicitly set, multiplexing
happens without any limit set. But the default value set for that
tunable is 1, which is confusing. This commit sets the default
value to 0, and prevents the user from being able to set this value
to 1 when brick-multiplexing is enbaled. The default value of 0
denotes that brick-multiplexing can happen without any limit on the
number of bricks per process.
Change-Id: I4647f7bf5837d520075dc5c19a6e75bc1bba258b
BUG: 1472417
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
Reviewed-on: https://review.gluster.org/17819
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-set.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 5ef86f764f4..4c07d3118af 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1027,6 +1027,14 @@ validate_mux_limit (glusterd_volinfo_t *volinfo, dict_t *dict, char *key, gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_INVALID_ENTRY, "%s", *op_errstr); } + + if (val == 1) { + gf_asprintf (op_errstr, "Brick-multiplexing is enabled. " + "Please set this option to a value other than 1 " + "to make use of the brick-multiplexing feature."); + ret = -1; + goto out; + } out: gf_msg_debug ("glusterd", 0, "Returning %d", ret); @@ -3452,14 +3460,17 @@ struct volopt_map_entry glusterd_volopt_map[] = { }, { .key = GLUSTERD_BRICKMUX_LIMIT_KEY, .voltype = "mgmt/glusterd", - .value = "1", + .value = "0", .op_version = GD_OP_VERSION_3_12_0, .validate_fn = validate_mux_limit, .type = GLOBAL_DOC, .description = "This option can be used to limit the number of brick " - "instances per brick process when brick multiplexing " - "is enabled. This option can be set only when brick " - "multiplexing feature enabled." + "instances per brick process when brick-multiplexing " + "is enabled. If not explicitly set, this tunable is " + "set to 0 which denotes that brick-multiplexing can " + "happen without any limit on the number of bricks per " + "process. Also this option can't be set when the " + "brick-multiplexing feature is disabled." }, { .key = "disperse.optimistic-change-log", .voltype = "cluster/disperse", |