diff options
| -rw-r--r-- | docs/rabbitmq.conf.example | 4 | ||||
| -rwxr-xr-x | scripts/rabbitmq-upgrade | 32 | ||||
| -rw-r--r-- | scripts/rabbitmq-upgrade.bat | 66 | ||||
| -rw-r--r-- | src/rabbit.erl | 6 | ||||
| -rw-r--r-- | src/rabbit_amqqueue.erl | 2 |
5 files changed, 105 insertions, 5 deletions
diff --git a/docs/rabbitmq.conf.example b/docs/rabbitmq.conf.example index 44ded7c737..3f66404a8f 100644 --- a/docs/rabbitmq.conf.example +++ b/docs/rabbitmq.conf.example @@ -955,8 +955,8 @@ ## ## Related doc guide: https://rabbitmq.com/ldap.html#authorisation. -## Following configuration should be defined in additional.config file -## DO NOT UNCOMMENT THIS LINES! +## Following configuration should be defined in advanced.config file +## DO NOT UNCOMMENT THESE LINES! ## Set the query to use when determining vhost access ## diff --git a/scripts/rabbitmq-upgrade b/scripts/rabbitmq-upgrade new file mode 100755 index 0000000000..3c60ad261b --- /dev/null +++ b/scripts/rabbitmq-upgrade @@ -0,0 +1,32 @@ +#!/bin/sh +## The contents of this file are subject to the Mozilla Public License +## Version 1.1 (the "License"); you may not use this file except in +## compliance with the License. You may obtain a copy of the License +## at https://www.mozilla.org/MPL/ +## +## Software distributed under the License is distributed on an "AS IS" +## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +## the License for the specific language governing rights and +## limitations under the License. +## +## The Original Code is RabbitMQ. +## +## The Initial Developer of the Original Code is GoPivotal, Inc. +## Copyright (c) 2007-2019 Pivotal Software, Inc. All rights reserved. +## + +# Exit immediately if a pipeline, which may consist of a single simple command, +# a list, or a compound command returns a non-zero status +set -e + +# Each variable or function that is created or modified is given the export +# attribute and marked for export to the environment of subsequent commands. +set -a + +# shellcheck source=/dev/null +# +# TODO: when shellcheck adds support for relative paths, change to +# shellcheck source=./rabbitmq-env +. "${0%/*}"/rabbitmq-env + +run_escript rabbitmqctl_escript "${ESCRIPT_DIR:?must be defined}"/rabbitmq-upgrade "$@" diff --git a/scripts/rabbitmq-upgrade.bat b/scripts/rabbitmq-upgrade.bat new file mode 100644 index 0000000000..921150b26b --- /dev/null +++ b/scripts/rabbitmq-upgrade.bat @@ -0,0 +1,66 @@ +@echo off +REM The contents of this file are subject to the Mozilla Public License +REM Version 1.1 (the "License"); you may not use this file except in +REM compliance with the License. You may obtain a copy of the License +REM at https://www.mozilla.org/MPL/ +REM +REM Software distributed under the License is distributed on an "AS IS" +REM basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +REM the License for the specific language governing rights and +REM limitations under the License. +REM +REM The Original Code is RabbitMQ. +REM +REM The Initial Developer of the Original Code is GoPivotal, Inc. +REM Copyright (c) 2007-2019 Pivotal Software, Inc. All rights reserved. +REM + +REM Scopes the variables to the current batch file +setlocal + +rem Preserve values that might contain exclamation marks before +rem enabling delayed expansion +set TDP0=%~dp0 +set STAR=%* +setlocal enabledelayedexpansion + +REM Get default settings with user overrides for (RABBITMQ_)<var_name> +REM Non-empty defaults should be set in rabbitmq-env +call "%TDP0%\rabbitmq-env.bat" %~n0 + +if not exist "!ERLANG_HOME!\bin\erl.exe" ( + echo. + echo ****************************** + echo ERLANG_HOME not set correctly. + echo ****************************** + echo. + echo Please either set ERLANG_HOME to point to your Erlang installation or place the + echo RabbitMQ server distribution in the Erlang lib folder. + echo. + exit /B 1 +) + +REM Disable erl_crash.dump by default for control scripts. +if not defined ERL_CRASH_DUMP_SECONDS ( + set ERL_CRASH_DUMP_SECONDS=0 +) + +"!ERLANG_HOME!\bin\erl.exe" +B ^ +-boot !CLEAN_BOOT_FILE! ^ +-noinput -noshell -hidden -smp enable ^ +!RABBITMQ_CTL_ERL_ARGS! ^ +-kernel inet_dist_listen_min !RABBITMQ_CTL_DIST_PORT_MIN! ^ +-kernel inet_dist_listen_max !RABBITMQ_CTL_DIST_PORT_MAX! ^ +-sasl errlog_type error ^ +-mnesia dir \""!RABBITMQ_MNESIA_DIR:\=/!"\" ^ +-nodename !RABBITMQ_NODENAME! ^ +-run escript start ^ +-escript main rabbitmqctl_escript ^ +-extra "%RABBITMQ_HOME%\escript\rabbitmq-upgrade" !STAR! + +if ERRORLEVEL 1 ( + exit /B %ERRORLEVEL% +) + +endlocal +endlocal diff --git a/src/rabbit.erl b/src/rabbit.erl index 29cd145330..7095966ced 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -1040,8 +1040,10 @@ boot_error(_, {error, {cannot_log_to_file, LogFile, Reason}}) -> [LogFile, Reason]); boot_error(_, {error, {generate_config_file, Error}}) -> log_boot_error_and_exit(generate_config_file, - "~nConfig file generation failed:~n~s~n", - [Error]); + "~nConfig file generation failed:~n~s" + "In case the setting comes from a plugin, make sure that the plugin is enabled.~n" + "Alternatively remove the setting from the config.~n", + [Error]); boot_error(Class, Reason) -> LogLocations = log_locations(), log_boot_error_and_exit( diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 6988f6614a..540e0789ca 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -526,7 +526,7 @@ is_match(Subj, E) -> iterative_rebalance(ByNode, MaxQueuesDesired) -> case maybe_migrate(ByNode, MaxQueuesDesired) of {ok, Summary} -> - rabbit_log:warning("Nothing to do, all balanced"), + rabbit_log:info("All queue masters are balanced"), {ok, Summary}; {migrated, Other} -> iterative_rebalance(Other, MaxQueuesDesired); |
