diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2012-02-01 13:45:22 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2012-02-01 13:45:22 +0000 |
| commit | 61a754a6ecbb580b1cf193a73fe2474b570d247c (patch) | |
| tree | c8d203eb882f64c1049cf2cd286722dd364d9c65 /src | |
| parent | 1ff50f4f37bf579a9b46990098236a16bb5dcb95 (diff) | |
| download | rabbitmq-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.erl | 4 |
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 |
