summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordcorbacho <dparracorbacho@piotal.io>2019-09-23 17:30:06 +0100
committerdcorbacho <dparracorbacho@piotal.io>2019-09-23 17:30:06 +0100
commit805c6715faf70b43f3e950c10390a66ec47309a1 (patch)
treef5eee5b3d5677697bd8d2e6237ab1661a604ae8d
parent6116a11cb25575a734f16074070418e805045c1d (diff)
parentedf98f35087da9f67cea8629cce1a1130299acaf (diff)
downloadrabbitmq-server-git-805c6715faf70b43f3e950c10390a66ec47309a1.tar.gz
Merge remote-tracking branch 'origin' into consume-events-command
-rw-r--r--docs/rabbitmq.conf.example4
-rwxr-xr-xscripts/rabbitmq-upgrade32
-rw-r--r--scripts/rabbitmq-upgrade.bat66
-rw-r--r--src/rabbit.erl6
-rw-r--r--src/rabbit_amqqueue.erl2
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);