diff options
| -rw-r--r-- | include/rabbit.hrl | 3 | ||||
| -rw-r--r-- | src/rabbit.erl | 26 |
2 files changed, 21 insertions, 8 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl index 9840416528..a805af6e5f 100644 --- a/include/rabbit.hrl +++ b/include/rabbit.hrl @@ -108,7 +108,8 @@ -define(COPYRIGHT_MESSAGE, "Copyright (C) 2007-2015 Pivotal Software, Inc."). -define(INFORMATION_MESSAGE, "Licensed under the MPL. See http://www.rabbitmq.com/"). --define(ERTS_MINIMUM, "5.6.3"). +-define(OTP_MINIMUM, "R16B03-1"). +-define(ERTS_MINIMUM, "5.10.4"). %% EMPTY_FRAME_SIZE, 8 = 1 + 2 + 4 + 1 %% - 1 byte of frame type diff --git a/src/rabbit.erl b/src/rabbit.erl index 62369e9d23..d218a07a98 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -230,8 +230,8 @@ -spec(start/2 :: ('normal',[]) -> {'error', {'erlang_version_too_old', - {'found',[any()]}, - {'required',[any(),...]}}} | + {'found',string(),string()}, + {'required',string(),string()}}} | {'ok',pid()}). -spec(stop/1 :: (_) -> 'ok'). @@ -708,11 +708,23 @@ log_broker_started(Plugins) -> end). erts_version_check() -> - FoundVer = erlang:system_info(version), - case rabbit_misc:version_compare(?ERTS_MINIMUM, FoundVer, lte) of - true -> ok; - false -> {error, {erlang_version_too_old, - {found, FoundVer}, {required, ?ERTS_MINIMUM}}} + ERTSVer = erlang:system_info(version), + OTPRel = erlang:system_info(otp_release), + case rabbit_misc:version_compare(?ERTS_MINIMUM, ERTSVer, lte) of + true when ?ERTS_MINIMUM =/= ERTSVer -> + ok; + true when ?ERTS_MINIMUM =:= ERTSVer andalso ?OTP_MINIMUM =< OTPRel -> + %% When a critical regression or bug is found, a new OTP + %% release can be published without changing the ERTS + %% version. For instance, this is the case with R16B03 and + %% R16B03-1. + %% + %% In this case, we compare the release versions + %% alphabetically. + ok; + _ -> {error, {erlang_version_too_old, + {found, OTPRel, ERTSVer}, + {required, ?OTP_MINIMUM, ?ERTS_MINIMUM}}} end. print_banner() -> |
