|
|
887953 |
From cf1ba3e3835b78d4ee60984f63ee9f9421e3e8a0 Mon Sep 17 00:00:00 2001
|
|
|
887953 |
From: Atin Mukherjee <amukherj@redhat.com>
|
|
|
887953 |
Date: Thu, 6 Dec 2018 23:14:57 +0530
|
|
|
887953 |
Subject: [PATCH 455/455] glusterd: fix get_mux_limit_per_process to read
|
|
|
887953 |
default value
|
|
|
887953 |
|
|
|
887953 |
get_mux_limit_per_process () reads the global option dictionary and in
|
|
|
887953 |
case it doesn't find out a key, assumes that
|
|
|
887953 |
cluster.max-bricks-per-process option isn't configured however the
|
|
|
887953 |
default value should be picked up in such case.
|
|
|
887953 |
|
|
|
887953 |
>Change-Id: I35dd8da084adbf59793d58557e818d8e6c17f9f3
|
|
|
887953 |
>Fixes: bz#1656951
|
|
|
887953 |
>Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
887953 |
|
|
|
887953 |
upstream patch: https://review.gluster.org/#/c/glusterfs/+/21819/
|
|
|
887953 |
|
|
|
887953 |
Change-Id: I35dd8da084adbf59793d58557e818d8e6c17f9f3
|
|
|
887953 |
BUG: 1656924
|
|
|
887953 |
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
887953 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/157960
|
|
|
887953 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
887953 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
887953 |
---
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 +-
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd-utils.c | 7 +------
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd-volume-set.c | 2 +-
|
|
|
887953 |
xlators/mgmt/glusterd/src/glusterd.h | 1 +
|
|
|
887953 |
4 files changed, 4 insertions(+), 8 deletions(-)
|
|
|
887953 |
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
887953 |
index f0c43f4..52a3db0 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
887953 |
@@ -84,7 +84,7 @@ glusterd_all_vol_opts valid_all_vol_opts[] = {
|
|
|
887953 |
* can be attached per process.
|
|
|
887953 |
* TBD: Discuss the default value for this. Maybe this should be a
|
|
|
887953 |
* dynamic value depending on the memory specifications per node */
|
|
|
887953 |
- { GLUSTERD_BRICKMUX_LIMIT_KEY, "250"},
|
|
|
887953 |
+ { GLUSTERD_BRICKMUX_LIMIT_KEY, GLUSTERD_BRICKMUX_LIMIT_DFLT_VALUE},
|
|
|
887953 |
/*{ GLUSTERD_LOCALTIME_LOGGING_KEY, "disable"},*/
|
|
|
887953 |
{ GLUSTERD_DAEMON_LOG_LEVEL_KEY, "INFO"},
|
|
|
887953 |
{ NULL },
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
887953 |
index b63c95a..d789c53 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
887953 |
@@ -137,12 +137,7 @@ get_mux_limit_per_process (int *mux_limit)
|
|
|
887953 |
|
|
|
887953 |
ret = dict_get_str (priv->opts, GLUSTERD_BRICKMUX_LIMIT_KEY, &value);
|
|
|
887953 |
if (ret) {
|
|
|
887953 |
- gf_msg_debug (this->name, 0, "Limit for number of bricks per "
|
|
|
887953 |
- "brick process not yet set in dict. Returning "
|
|
|
887953 |
- "limit as 0 denoting that multiplexing can "
|
|
|
887953 |
- "happen with no limit set.");
|
|
|
887953 |
- ret = 0;
|
|
|
887953 |
- goto out;
|
|
|
887953 |
+ value = GLUSTERD_BRICKMUX_LIMIT_DFLT_VALUE;
|
|
|
887953 |
}
|
|
|
887953 |
|
|
|
887953 |
ret = gf_string2int (value, &max_bricks_per_proc);
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
887953 |
index 27d7b20..fb6a81b 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
887953 |
@@ -3534,7 +3534,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
|
|
|
887953 |
},
|
|
|
887953 |
{ .key = GLUSTERD_BRICKMUX_LIMIT_KEY,
|
|
|
887953 |
.voltype = "mgmt/glusterd",
|
|
|
887953 |
- .value = "250",
|
|
|
887953 |
+ .value = GLUSTERD_BRICKMUX_LIMIT_DFLT_VALUE,
|
|
|
887953 |
.op_version = GD_OP_VERSION_3_11_1,
|
|
|
887953 |
.validate_fn = validate_mux_limit,
|
|
|
887953 |
.type = GLOBAL_DOC,
|
|
|
887953 |
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
|
|
|
887953 |
index 3dfbf9c..bfa8310 100644
|
|
|
887953 |
--- a/xlators/mgmt/glusterd/src/glusterd.h
|
|
|
887953 |
+++ b/xlators/mgmt/glusterd/src/glusterd.h
|
|
|
887953 |
@@ -55,6 +55,7 @@
|
|
|
887953 |
#define GLUSTERD_SHARED_STORAGE_KEY "cluster.enable-shared-storage"
|
|
|
887953 |
#define GLUSTERD_BRICK_MULTIPLEX_KEY "cluster.brick-multiplex"
|
|
|
887953 |
#define GLUSTERD_BRICKMUX_LIMIT_KEY "cluster.max-bricks-per-process"
|
|
|
887953 |
+#define GLUSTERD_BRICKMUX_LIMIT_DFLT_VALUE "250"
|
|
|
887953 |
#define GLUSTERD_LOCALTIME_LOGGING_KEY "cluster.localtime-logging"
|
|
|
887953 |
#define GLUSTERD_DAEMON_LOG_LEVEL_KEY "cluster.daemon-log-level"
|
|
|
887953 |
|
|
|
887953 |
--
|
|
|
887953 |
1.8.3.1
|
|
|
887953 |
|