summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2017-09-11 00:31:25 -0400
committerMichael Klishin <michael@clojurewerkz.org>2017-09-11 00:31:25 -0400
commit52ab32e5fb9c4465091a9b6e7305f66942607687 (patch)
tree4797ea5b1b3fae29aef509355c17686c22a494a5 /priv
parentf34890e89c51d21a3fc3714d63d8ad1b15fc9352 (diff)
downloadrabbitmq-server-git-52ab32e5fb9c4465091a9b6e7305f66942607687.tar.gz
Make it possible to configure randomized startup delay range via new style configv3.7.0-beta.20
Diffstat (limited to 'priv')
-rw-r--r--priv/schema/rabbit.schema26
1 files changed, 26 insertions, 0 deletions
diff --git a/priv/schema/rabbit.schema b/priv/schema/rabbit.schema
index cd6d7a6781..660f85d915 100644
--- a/priv/schema/rabbit.schema
+++ b/priv/schema/rabbit.schema
@@ -833,6 +833,32 @@ fun(Conf) ->
end
end}.
+%% Cluster formation: Randomized startup delay
+
+{mapping, "cluster_formation.randomized_startup_delay_range.min", "rabbit.cluster_formation.randomized_delay_range",
+ [{datatype, integer}]}.
+{mapping, "cluster_formation.randomized_startup_delay_range.max", "rabbit.cluster_formation.randomized_delay_range",
+ [{datatype, integer}]}.
+
+{translation, "rabbit.cluster_formation.randomized_delay_range",
+fun(Conf) ->
+ Min = cuttlefish:conf_get("cluster_formation.randomized_startup_delay_range.min", Conf, undefined),
+ Max = cuttlefish:conf_get("cluster_formation.randomized_startup_delay_range.max", Conf, undefined),
+
+ case {Min, Max} of
+ {undefined, undefined} ->
+ cuttlefish:unset();
+ {undefined, Max} ->
+ %% fallback default
+ {5, Max};
+ {Min, undefined} ->
+ %% fallback default
+ {Min, 60};
+ {Min, Max} ->
+ {Min, Max}
+ end
+end}.
+
%% Classic config-driven peer discuvery backend.
%%
%% Make clustering happen *automatically* at startup - only applied