summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_mnesia.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 7e61d2142d..5658c9fe67 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -110,10 +110,22 @@ init() ->
init_from_config() ->
{TryNodes, NodeType} =
case application:get_env(rabbit, cluster_nodes) of
- {ok, {TryNodes, disc} = C} when is_list(TryNodes) ->
+ {ok, {Nodes, disc} = C} when is_list(Nodes) ->
C;
- {ok, {TryNodes, ram } = C} when is_list(TryNodes) ->
+ {ok, {Nodes, ram } = C} when is_list(Nodes) ->
C;
+ {ok, Nodes} when is_list(Nodes) ->
+ rabbit_log:info("blahblah ~p~n", [Nodes]),
+ %% Legacy config
+ rabbit_log:warning(
+ "Legacy 'cluster_nodes' configuration, use "
+ "{Nodes, NodeType}, where Nodes contains the nodes that the "
+ "node will try to cluster with, and NodeType is either "
+ "'disc' or 'ram'."),
+ {Nodes -- [node()], case lists:member(node(), Nodes) of
+ true -> disc;
+ false -> ram
+ end};
_ ->
e(invalid_cluster_config)
end,