summaryrefslogtreecommitdiff
path: root/src
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
commit61a754a6ecbb580b1cf193a73fe2474b570d247c (patch)
treec8d203eb882f64c1049cf2cd286722dd364d9c65 /src
parent1ff50f4f37bf579a9b46990098236a16bb5dcb95 (diff)
downloadrabbitmq-server-git-61a754a6ecbb580b1cf193a73fe2474b570d247c.tar.gz
Base discnodeness on what we want to become, not what we are.
Diffstat (limited to 'src')
-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 0dc22914bf..802f5a2529 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