summaryrefslogtreecommitdiff
path: root/src
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
commitb2c8c2546ce85abc116b47a1da89ea508c1d1012 (patch)
tree043dfeab186adfe269cfcc2a2f936f71da2e3b7a /src
parentc128db2586153123a1128a02c3dbaf7e2cd85ce4 (diff)
downloadrabbitmq-server-git-b2c8c2546ce85abc116b47a1da89ea508c1d1012.tar.gz
Special case the 3.0.0 version check.
Diffstat (limited to 'src')
-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 779ac0732d..6576ba5210 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",