summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-02-01 13:45:22 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-02-01 13:45:22 +0000
commit45a96e44ad79563af93a1a90b7b1e2eda270831f (patch)
treec8d203eb882f64c1049cf2cd286722dd364d9c65
parentf8f46c627d2f0c7c68368bae585820c8dafa2de0 (diff)
downloadrabbitmq-server-45a96e44ad79563af93a1a90b7b1e2eda270831f.tar.gz
Base discnodeness on what we want to become, not what we are.
-rw-r--r--src/rabbit_mnesia.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 0dc22914..802f5a25 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -511,14 +511,14 @@ init_db(ClusterNodes, Force, SecondaryPostMnesiaFun) ->
ProperClusterNodes = UClusterNodes -- [node()],
case mnesia:change_config(extra_db_nodes, ProperClusterNodes) of
{ok, Nodes} ->
- case Nodes =:= [] andalso not is_disc_node() andalso not Force of
+ WantDiscNode = should_be_disc_node(ClusterNodes),
+ case Nodes =:= [] andalso not WantDiscNode andalso not Force of
false -> ok;
true -> throw({error, {failed_to_cluster_with,
ProperClusterNodes,
"Mnesia could not connect "
"to any disc nodes."}})
end,
- WantDiscNode = should_be_disc_node(ClusterNodes),
WasDiscNode = is_disc_node(),
%% We create a new db (on disk, or in ram) in the first
%% two cases and attempt to upgrade the in the other two