summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-02-01 15:43:04 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2012-02-01 15:43:04 +0000
commit7a85b10188cf8ef2349d508ec31786522e5b3483 (patch)
tree504ff172e12e51d97c4d876d73cb2ffea1ee4225
parenta48f8daf725dc7e4e4427571a7535cf3b7c280b9 (diff)
downloadrabbitmq-server-bug24703.tar.gz
simplifybug24703
-rw-r--r--src/rabbit_mnesia.erl11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index ab936c18..0f33a38a 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -520,15 +520,10 @@ init_db(ClusterNodes, Force, SecondaryPostMnesiaFun) ->
UClusterNodes = lists:usort(ClusterNodes),
ProperClusterNodes = UClusterNodes -- [node()],
case mnesia:change_config(extra_db_nodes, ProperClusterNodes) of
+ {ok, []} when not Force andalso ProperClusterNodes =/= [] ->
+ throw({error, {failed_to_cluster_with, ProperClusterNodes,
+ "Mnesia could not connect to any disc nodes."}});
{ok, Nodes} ->
- case {ProperClusterNodes, Nodes, Force} of
- {[], [], false} -> ok;
- {_, [], false} -> throw({error, {failed_to_cluster_with,
- ProperClusterNodes,
- "Mnesia could not connect "
- "to any disc nodes."}});
- _ -> ok
- end,
WasDiscNode = is_disc_node(),
WantDiscNode = should_be_disc_node(ClusterNodes),
%% We create a new db (on disk, or in ram) in the first