summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2011-05-30 09:58:49 +0000
committerAnand Avati <avati@gluster.com>2011-05-31 09:11:54 -0700
commite24f12d170d2e04ae7a88c34ed2c9aa39466c3dd (patch)
tree6c4d6432b5f4f60c1133008e90325234ad810d67 /xlators
parent0dec073336cc31a5158ce8e5354943bd2638afd2 (diff)
mgmt/glusterd: Set option listen-backlog to 128
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2941 (glusterd breaks when starting ~100 volumes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2941
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c16
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 22991db5686..cf036145068 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -218,12 +218,28 @@ int
glusterd_rpcsvc_options_build (dict_t *options)
{
int ret = 0;
+ uint32_t backlog = 0;
if (!dict_get (options, "rpc-auth-allow-insecure")) {
ret = dict_set_str (options, "rpc-auth-allow-insecure", "on");
if (ret)
goto out;
}
+
+ ret = dict_get_uint32 (options, "transport.socket.listen-backlog",
+ &backlog);
+
+ if (ret) {
+ backlog = GLUSTERD_SOCKET_LISTEN_BACKLOG;
+ ret = dict_set_uint32 (options,
+ "transport.socket.listen-backlog",
+ backlog);
+ if (ret)
+ goto out;
+ }
+
+ gf_log ("", GF_LOG_DEBUG, "listen-backlog value: %d", backlog);
+
out:
return ret;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 2b02a513981..72529f792c7 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -51,6 +51,7 @@
#define DEFAULT_LOG_FILE_DIRECTORY DATADIR "/log/glusterfs"
#define GLUSTERD_TR_LOG_SIZE 50
#define GLUSTERD_NAME "glusterd"
+#define GLUSTERD_SOCKET_LISTEN_BACKLOG 128
typedef enum glusterd_op_ {