summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2014-11-20 09:45:37 +0100
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2014-11-20 09:45:37 +0100
commit2325ed570a7743fd85d44a54370a2228246d7195 (patch)
tree1995abbb1df14e46a18faecbbb7d659bb43006f2 /src
parent21984c64fc401d9f1c1bf11c185c78dbf726dc15 (diff)
downloadrabbitmq-server-git-2325ed570a7743fd85d44a54370a2228246d7195.tar.gz
Remove support for the legacy 'cluster_nodes' values
Before this change, a list of nodes without the node type was accepted. In this case, the node type was guessed and a warning suggesting how to update the configuration was logged. Now, the node type is mandatory and the RabbitMQ server refuses to start if the node type is unspecified.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_mnesia.erl20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index fa51dd70de..d3cacb1757 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -116,18 +116,9 @@ init_from_config() ->
{TryNodes, NodeType} =
case application:get_env(rabbit, cluster_nodes) of
{ok, Nodes} when is_list(Nodes) ->
- Config = {Nodes -- [node()], case lists:member(node(), Nodes) of
- true -> disc;
- false -> ram
- end},
- rabbit_log:warning(
- "Converting legacy 'cluster_nodes' configuration~n ~w~n"
- "to~n ~w.~n~n"
- "Please update the configuration to the new format "
- "{Nodes, NodeType}, where Nodes contains the nodes that the "
- "node will try to cluster with, and NodeType is either "
- "'disc' or 'ram'~n", [Nodes, Config]),
- Config;
+ %% The legacy syntax (a nodes list without the node
+ %% type) is unsupported.
+ e(cluster_node_type_mandatory);
{ok, Config} ->
Config
end,
@@ -865,4 +856,7 @@ error_description(removing_node_from_offline_node) ->
"To remove a node remotely from an offline node, the node you are removing "
"from must be a disc node and all the other nodes must be offline.";
error_description(no_running_cluster_nodes) ->
- "You cannot leave a cluster if no online nodes are present.".
+ "You cannot leave a cluster if no online nodes are present.";
+error_description(cluster_node_type_mandatory) ->
+ "The 'cluster_nodes' configuration key must indicate the node type: "
+ "either {[...], disc} or {[...], ram}".