summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-12-05 13:10:12 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-12-05 13:10:12 +0000
commit98d871ee77528da4e732dae179d5986b9350720e (patch)
tree043dfeab186adfe269cfcc2a2f936f71da2e3b7a
parent1f8ce4db2177b3652995c94960082b88dd3b0861 (diff)
downloadrabbitmq-server-98d871ee77528da4e732dae179d5986b9350720e.tar.gz
Special case the 3.0.0 version check.
-rw-r--r--src/rabbit_mnesia.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl
index 779ac073..6576ba52 100644
--- a/src/rabbit_mnesia.erl
+++ b/src/rabbit_mnesia.erl
@@ -763,15 +763,22 @@ check_version_consistency(This, Remote, Name) ->
check_version_consistency(This, Remote, Name, Comp) ->
case Comp(This, Remote) of
true -> ok;
- false -> {error, {inconsistent_cluster,
- rabbit_misc:format(
- "~s version mismatch: local node is ~s, "
- "remote node ~s", [Name, This, Remote])}}
+ false -> version_error(Name, This, Remote)
end.
+version_error(Name, This, Remote) ->
+ {error, {inconsistent_cluster,
+ rabbit_misc:format("~s version mismatch: local node is ~s, "
+ "remote node ~s", [Name, This, Remote])}}.
+
check_otp_consistency(Remote) ->
check_version_consistency(erlang:system_info(otp_release), Remote, "OTP").
+%% Unlike the rest of 3.0.x, 3.0.0 is not compatible. This can be
+%% removed after 3.1.0 is released.
+check_rabbit_consistency("3.0.0") ->
+ version_error("Rabbit", rabbit_misc:version(), "3.0.0");
+
check_rabbit_consistency(Remote) ->
check_version_consistency(
rabbit_misc:version(), Remote, "Rabbit",