2014-06-09 20:53:57 +08:00
|
|
|
#!/bin/sh -e
|
2011-01-19 21:53:32 +08:00
|
|
|
## 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 http://www.mozilla.org/MPL/
|
2009-07-22 22:48:50 +08:00
|
|
|
##
|
2011-01-19 21:53:32 +08:00
|
|
|
## 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.
|
2009-07-22 22:48:50 +08:00
|
|
|
##
|
2011-01-19 21:53:32 +08:00
|
|
|
## The Original Code is RabbitMQ.
|
2009-07-22 22:48:50 +08:00
|
|
|
##
|
2013-07-01 17:49:14 +08:00
|
|
|
## The Initial Developer of the Original Code is GoPivotal, Inc.
|
2019-01-14 03:54:12 +08:00
|
|
|
## Copyright (c) 2007-2019 Pivotal Software, Inc. All rights reserved.
|
2009-07-22 22:48:50 +08:00
|
|
|
##
|
|
|
|
|
2015-04-08 17:52:50 +08:00
|
|
|
if [ "$RABBITMQ_ENV_LOADED" = 1 ]; then
|
|
|
|
return 0;
|
|
|
|
fi
|
|
|
|
|
2015-04-03 22:27:04 +08:00
|
|
|
if [ -z "$RABBITMQ_SCRIPTS_DIR" ]; then
|
|
|
|
# We set +e here since since our test for "readlink -f" below needs to
|
|
|
|
# be able to fail.
|
|
|
|
set +e
|
|
|
|
# Determine where this script is really located (if this script is
|
|
|
|
# invoked from another script, this is the location of the caller)
|
|
|
|
SCRIPT_PATH="$0"
|
|
|
|
while [ -h "$SCRIPT_PATH" ] ; do
|
|
|
|
# Determine if readlink -f is supported at all. TODO clean this up.
|
|
|
|
FULL_PATH=`readlink -f $SCRIPT_PATH 2>/dev/null`
|
|
|
|
if [ "$?" != "0" ]; then
|
|
|
|
REL_PATH=`readlink $SCRIPT_PATH`
|
|
|
|
if expr "$REL_PATH" : '/.*' > /dev/null; then
|
|
|
|
SCRIPT_PATH="$REL_PATH"
|
|
|
|
else
|
|
|
|
SCRIPT_PATH="`dirname "$SCRIPT_PATH"`/$REL_PATH"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
SCRIPT_PATH=$FULL_PATH
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
set -e
|
|
|
|
|
|
|
|
RABBITMQ_SCRIPTS_DIR=`dirname $SCRIPT_PATH`
|
|
|
|
fi
|
|
|
|
|
2018-09-06 22:49:19 +08:00
|
|
|
_rmq_env_now()
|
|
|
|
{
|
|
|
|
date '+%Y-%m-%d %H:%M:%S'
|
|
|
|
}
|
|
|
|
|
|
|
|
_rmq_env_print()
|
|
|
|
{
|
|
|
|
_rmq_env_tmp="$1"
|
|
|
|
_rmq_env_tmp_len="${#_rmq_env_tmp}"
|
|
|
|
shift
|
|
|
|
printf '%s %s %s\n' "$(_rmq_env_now)" "$_rmq_env_tmp" "$1" 1>&2
|
|
|
|
shift
|
|
|
|
_rmq_env_print_line=''
|
|
|
|
_rmq_env_indent="$((_rmq_env_tmp_len + 21))"
|
|
|
|
for _rmq_env_print_line in "$@"
|
|
|
|
do
|
|
|
|
printf "%${_rmq_env_indent}s%s\n" ' ' "$_rmq_env_print_line" 1>&2
|
|
|
|
done
|
|
|
|
unset _rmq_env_print_line
|
|
|
|
unset _rmq_env_indent
|
|
|
|
unset _rmq_env_tmp_len
|
|
|
|
unset _rmq_env_tmp
|
|
|
|
}
|
|
|
|
|
|
|
|
_rmq_env_perr()
|
|
|
|
{
|
|
|
|
_rmq_env_print '[error]' "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
_rmq_env_pwarn()
|
|
|
|
{
|
|
|
|
_rmq_env_print '[warning]' "$@"
|
|
|
|
}
|
|
|
|
|
2015-10-30 19:33:26 +08:00
|
|
|
rmq_realpath() {
|
|
|
|
local path=$1
|
|
|
|
|
|
|
|
if [ -d "$path" ]; then
|
|
|
|
cd "$path" && pwd
|
|
|
|
elif [ -f "$path" ]; then
|
|
|
|
cd "$(dirname "$path")" && echo $(pwd)/$(basename "$path")
|
|
|
|
else
|
|
|
|
echo "$path"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2016-10-29 01:50:22 +08:00
|
|
|
path_contains_existing_directory() {
|
|
|
|
local path="${1:?}"
|
|
|
|
local dir
|
|
|
|
local rc
|
|
|
|
local IFS="
|
|
|
|
"
|
|
|
|
for dir in $(echo "$path" | tr ':' '\n'); do
|
|
|
|
if [ -d "$dir" ]; then
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2015-10-30 19:33:26 +08:00
|
|
|
RABBITMQ_HOME="$(rmq_realpath "${RABBITMQ_SCRIPTS_DIR}/..")"
|
2016-10-27 21:49:02 +08:00
|
|
|
ESCRIPT_DIR="${RABBITMQ_HOME}/escript"
|
2014-10-17 21:40:39 +08:00
|
|
|
|
2012-02-28 18:56:15 +08:00
|
|
|
## Set defaults
|
2015-04-03 22:27:04 +08:00
|
|
|
. ${RABBITMQ_SCRIPTS_DIR}/rabbitmq-defaults
|
2012-02-28 18:56:15 +08:00
|
|
|
|
2018-09-06 22:49:19 +08:00
|
|
|
# We save the current value of $RABBITMQ_PID_FILE in case it was set by
|
|
|
|
# an init script. If $CONF_ENV_FILE overrides it again, we must ignore
|
|
|
|
# it and warn the user.
|
|
|
|
saved_RABBITMQ_PID_FILE="$RABBITMQ_PID_FILE"
|
|
|
|
|
2017-08-23 00:52:24 +08:00
|
|
|
## Get configuration variables from the configure environment file
|
|
|
|
[ "x" = "x$RABBITMQ_CONF_ENV_FILE" ] && RABBITMQ_CONF_ENV_FILE=${CONF_ENV_FILE}
|
|
|
|
[ -f ${RABBITMQ_CONF_ENV_FILE} ] && . ${RABBITMQ_CONF_ENV_FILE} || true
|
|
|
|
|
2018-10-12 04:30:49 +08:00
|
|
|
[ -n "$ERL_EPMD_PORT" ] && export ERL_EPMD_PORT
|
|
|
|
[ -n "$ERL_EPMD_ADDRESS" ] && export ERL_EPMD_ADDRESS
|
|
|
|
|
2016-07-14 19:35:03 +08:00
|
|
|
DEFAULT_SCHEDULER_BIND_TYPE="db"
|
2018-02-26 20:05:20 +08:00
|
|
|
[ -n "$SCHEDULER_BIND_TYPE" ] || SCHEDULER_BIND_TYPE="$DEFAULT_SCHEDULER_BIND_TYPE"
|
|
|
|
[ -n "$RABBITMQ_SCHEDULER_BIND_TYPE" ] || RABBITMQ_SCHEDULER_BIND_TYPE="$SCHEDULER_BIND_TYPE"
|
2016-06-30 20:20:35 +08:00
|
|
|
|
2018-08-03 03:08:59 +08:00
|
|
|
DEFAULT_DISTRIBUTION_BUFFER_SIZE=128000
|
2018-02-26 20:05:20 +08:00
|
|
|
[ -n "$DISTRIBUTION_BUFFER_SIZE" ] || DISTRIBUTION_BUFFER_SIZE="$DEFAULT_DISTRIBUTION_BUFFER_SIZE"
|
|
|
|
[ -n "$RABBITMQ_DISTRIBUTION_BUFFER_SIZE" ] || RABBITMQ_DISTRIBUTION_BUFFER_SIZE="$DISTRIBUTION_BUFFER_SIZE"
|
2016-09-12 17:48:37 +08:00
|
|
|
|
2018-08-03 03:08:59 +08:00
|
|
|
DEFAULT_MAX_NUMBER_OF_PROCESSES=1048576
|
2018-02-26 20:05:20 +08:00
|
|
|
[ -n "$MAX_NUMBER_OF_PROCESSES" ] || MAX_NUMBER_OF_PROCESSES="$DEFAULT_MAX_NUMBER_OF_PROCESSES"
|
|
|
|
[ -n "$RABBITMQ_MAX_NUMBER_OF_PROCESSES" ] || RABBITMQ_MAX_NUMBER_OF_PROCESSES="$MAX_NUMBER_OF_PROCESSES"
|
2018-02-24 01:53:33 +08:00
|
|
|
|
2018-08-03 04:10:23 +08:00
|
|
|
DEFAULT_MAX_NUMBER_OF_ATOMS=5000000
|
2018-02-26 20:05:20 +08:00
|
|
|
[ -n "$MAX_NUMBER_OF_ATOMS" ] || MAX_NUMBER_OF_ATOMS="$DEFAULT_MAX_NUMBER_OF_ATOMS"
|
|
|
|
[ -n "$RABBITMQ_MAX_NUMBER_OF_ATOMS" ] || RABBITMQ_MAX_NUMBER_OF_ATOMS="$MAX_NUMBER_OF_ATOMS"
|
2016-09-12 17:48:37 +08:00
|
|
|
|
2018-01-30 02:56:30 +08:00
|
|
|
## Common server defaults
|
2018-02-26 20:05:20 +08:00
|
|
|
SERVER_ERL_ARGS=" +P $RABBITMQ_MAX_NUMBER_OF_PROCESSES +t $RABBITMQ_MAX_NUMBER_OF_ATOMS +stbt $RABBITMQ_SCHEDULER_BIND_TYPE +zdbbl $RABBITMQ_DISTRIBUTION_BUFFER_SIZE "
|
2012-01-04 23:57:19 +08:00
|
|
|
|
2014-10-22 18:26:18 +08:00
|
|
|
[ "x" = "x$RABBITMQ_USE_LONGNAME" ] && RABBITMQ_USE_LONGNAME=${USE_LONGNAME}
|
|
|
|
if [ "xtrue" = "x$RABBITMQ_USE_LONGNAME" ] ; then
|
|
|
|
RABBITMQ_NAME_TYPE=-name
|
2015-11-04 18:25:33 +08:00
|
|
|
[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname -f`
|
|
|
|
[ "x" = "x$NODENAME" ] && NODENAME=rabbit@${HOSTNAME}
|
2014-10-22 18:26:18 +08:00
|
|
|
else
|
|
|
|
RABBITMQ_NAME_TYPE=-sname
|
2015-11-04 18:25:33 +08:00
|
|
|
[ "x" = "x$HOSTNAME" ] && HOSTNAME=`env hostname`
|
|
|
|
[ "x" = "x$NODENAME" ] && NODENAME=rabbit@${HOSTNAME%%.*}
|
2014-10-22 18:26:18 +08:00
|
|
|
fi
|
|
|
|
|
2014-07-03 19:08:05 +08:00
|
|
|
##--- Set environment vars RABBITMQ_<var_name> to defaults if not set
|
|
|
|
|
2015-04-21 16:59:55 +08:00
|
|
|
rmq_normalize_path() {
|
|
|
|
local path=$1
|
|
|
|
|
2016-10-29 01:50:22 +08:00
|
|
|
# Remove redundant slashes and strip a trailing slash for a
|
|
|
|
# PATH-like vars - ':' is the delimiter
|
|
|
|
echo "$path" | sed -e 's#/\{2,\}#/#g' -e 's#/$##' -e 's#/:#:#g'
|
2015-04-21 16:59:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
rmq_normalize_path_var() {
|
|
|
|
local var warning
|
|
|
|
|
|
|
|
local prefix="WARNING:"
|
|
|
|
|
|
|
|
for var in "$@"; do
|
|
|
|
local path=$(eval "echo \"\$$var\"")
|
|
|
|
case "$path" in
|
|
|
|
*/)
|
|
|
|
warning=1
|
|
|
|
echo "$prefix Removing trailing slash from $var" 1>&2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
eval "$var=$(rmq_normalize_path "$path")"
|
|
|
|
|
|
|
|
if [ "x$warning" = "x1" ]; then
|
|
|
|
prefix=" "
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2015-04-21 01:07:06 +08:00
|
|
|
rmq_check_if_shared_with_mnesia() {
|
2015-04-21 16:59:55 +08:00
|
|
|
local var warning
|
2015-04-21 01:07:06 +08:00
|
|
|
|
|
|
|
local mnesia_dir=$(rmq_realpath "${RABBITMQ_MNESIA_DIR}")
|
|
|
|
local prefix="WARNING:"
|
|
|
|
|
|
|
|
for var in "$@"; do
|
|
|
|
local dir=$(eval "echo \"\$$var\"")
|
|
|
|
|
|
|
|
case $(rmq_realpath "$dir") in
|
|
|
|
${mnesia_dir})
|
|
|
|
warning=1
|
|
|
|
echo "$prefix $var is equal to RABBITMQ_MNESIA_DIR" 1>&2
|
|
|
|
;;
|
|
|
|
${mnesia_dir}/*)
|
|
|
|
warning=1
|
|
|
|
echo "$prefix $var is located inside RABBITMQ_MNESIA_DIR" 1>&2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "x$warning" = "x1" ]; then
|
|
|
|
prefix=" "
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "x$warning" = "x1" ]; then
|
|
|
|
echo "$prefix => Auto-clustering will not work ('cluster_nodes' in rabbitmq.config)" 1>&2
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2014-07-03 19:08:05 +08:00
|
|
|
DEFAULT_NODE_IP_ADDRESS=auto
|
|
|
|
DEFAULT_NODE_PORT=5672
|
2018-01-30 02:56:30 +08:00
|
|
|
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_NODE_IP_ADDRESS" ] && RABBITMQ_NODE_IP_ADDRESS=${NODE_IP_ADDRESS}
|
|
|
|
[ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_PORT=${NODE_PORT}
|
|
|
|
|
|
|
|
[ "x" = "x$RABBITMQ_NODE_IP_ADDRESS" ] && [ "x" != "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_IP_ADDRESS=${DEFAULT_NODE_IP_ADDRESS}
|
|
|
|
[ "x" != "x$RABBITMQ_NODE_IP_ADDRESS" ] && [ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_NODE_PORT=${DEFAULT_NODE_PORT}
|
|
|
|
|
|
|
|
[ "x" = "x$RABBITMQ_DIST_PORT" ] && RABBITMQ_DIST_PORT=${DIST_PORT}
|
|
|
|
[ "x" = "x$RABBITMQ_DIST_PORT" ] && [ "x" = "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_DIST_PORT=$((${DEFAULT_NODE_PORT} + 20000))
|
|
|
|
[ "x" = "x$RABBITMQ_DIST_PORT" ] && [ "x" != "x$RABBITMQ_NODE_PORT" ] && RABBITMQ_DIST_PORT=$((${RABBITMQ_NODE_PORT} + 20000))
|
|
|
|
|
2018-01-30 02:56:30 +08:00
|
|
|
[ "x" = "x$RABBITMQ_CTL_ERL_ARGS" ] && RABBITMQ_CTL_ERL_ARGS=${CTL_ERL_ARGS}
|
|
|
|
[ "x" = "x$RABBITMQ_CTL_DIST_PORT_MIN" ] && RABBITMQ_CTL_DIST_PORT_MIN=${CTL_DIST_PORT_MIN}
|
|
|
|
[ "x" = "x$RABBITMQ_CTL_DIST_PORT_MAX" ] && RABBITMQ_CTL_DIST_PORT_MAX=${CTL_DIST_PORT_MAX}
|
|
|
|
[ "x" = "x$RABBITMQ_CTL_DIST_PORT_MIN" ] && RABBITMQ_CTL_DIST_PORT_MIN=$((${RABBITMQ_DIST_PORT} + 10000))
|
|
|
|
[ "x" = "x$RABBITMQ_CTL_DIST_PORT_MAX" ] && RABBITMQ_CTL_DIST_PORT_MAX=$((${RABBITMQ_DIST_PORT} + 10010))
|
|
|
|
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_NODENAME" ] && RABBITMQ_NODENAME=${NODENAME}
|
2015-07-02 09:31:24 +08:00
|
|
|
[ "x" = "x$RABBITMQ_IO_THREAD_POOL_SIZE" ] && RABBITMQ_IO_THREAD_POOL_SIZE=${IO_THREAD_POOL_SIZE}
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_SERVER_ERL_ARGS" ] && RABBITMQ_SERVER_ERL_ARGS=${SERVER_ERL_ARGS}
|
|
|
|
[ "x" = "x$RABBITMQ_CONFIG_FILE" ] && RABBITMQ_CONFIG_FILE=${CONFIG_FILE}
|
|
|
|
[ "x" = "x$RABBITMQ_LOG_BASE" ] && RABBITMQ_LOG_BASE=${LOG_BASE}
|
|
|
|
[ "x" = "x$RABBITMQ_MNESIA_BASE" ] && RABBITMQ_MNESIA_BASE=${MNESIA_BASE}
|
|
|
|
[ "x" = "x$RABBITMQ_SERVER_START_ARGS" ] && RABBITMQ_SERVER_START_ARGS=${SERVER_START_ARGS}
|
|
|
|
[ "x" = "x$RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS" ] && RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=${SERVER_ADDITIONAL_ERL_ARGS}
|
2016-05-20 20:43:35 +08:00
|
|
|
[ "x" = "x$RABBITMQ_SERVER_CODE_PATH" ] && RABBITMQ_SERVER_CODE_PATH=${SERVER_CODE_PATH}
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${MNESIA_DIR}
|
|
|
|
[ "x" = "x$RABBITMQ_MNESIA_DIR" ] && RABBITMQ_MNESIA_DIR=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME}
|
Quorum queues (#1706)
* Test queue.declare method with quorum type
[#154472130]
* Cosmetics
[#154472130]
* Start quorum queue
Includes ra as a rabbit dependency
[#154472152]
* Update info and list operations to use quorum queues
Basic implementation. Might need an update when more functionality
is added to the quorum queues.
[#154472152]
* Stop quorum queue
[#154472158]
* Restart quorum queue
[#154472164]
* Introduce UId in ra config to support newer version of ra
Improved ra stop
[#154472158]
* Put data inside VHost specific subdirs
[#154472164]
* Include ra in rabbit deps to support stop_app/start_app command
[#154472164]
* Stop quorum queues in `rabbit_amqqueue:stop/1`
[#154472158]
* Revert creation of fifo ets table inside rabbit
Now supported by ra
[#154472158]
* Filter quorum queues
[#154472158]
* Test restart node with quorum queues
[#154472164]
* Publish to quorum queues
[#154472174]
* Use `ra:restart_node/1`
[#154472164]
* Wait for stats to be published when querying quorum queues
[#154472174]
* Test publish and queue length after restart
[#154472174]
* Consume messages from quorum queues with basic.get
[#154472211]
* Autoack messages from quorum queues on basic.get
[#154472211]
* Fix no_ack meaning
no_ack = true is equivalent to autoack
[#154472211]
* Use data_dir as provided in the config
If we modify the data_dir, ra is not able to delete the data
when a queue is deleted
[#154472158]
* Remove unused code/variables
[#154472158]
* Subscribe to a quorum queue
Supports auto-ack
[#154472215]
* Ack messages consumed from quorum queues
[#154472221]
* Nack messages consumed from quorum queues
[#154804608]
* Use delivery tag as consumer tag for basic.get in quorum queues
[#154472221]
* Support for publisher confirms in quorum queues
[#154472198]
* Integrate with ra_fifo_client
* Clear queue state on queue.delete
[#154472158]
* Fix quorum nack
[#154804608]
* Test redelivery after nack
[#154804608]
* Nack without requeueing
[#154472225]
* Test multiple acks
[#154804208]
* Test multiple nacks
[#154804314]
* Configure dead letter exchange with queue declare
[#155076661]
* Use a per-vhost process to handle dead-lettering
Needs to hold state for quorum queues
[#155401802]
* Implement dead-lettering on nack'ed messages
[#154804620]
* Use queue name as a resource on message delivery
Fixes a previously introduced bug
[#154804608]
* Handle ra events on dead letter process
[#155401802]
* Pass empty queue states to queue delete
Queue deletion on vhost deletion calls directly to rabbit_amqqueue.
Queue states are not available, but we can provide an empty map as
in deletion the states are only needed for cleanup.
* Generate quorum queue stats and events
Consumer delete events are still pending, as depend on basic.cancel
(not implemented yet), ra terminating or ra detecting channel down
[#154472241]
* Ensure quorum mapping entries are available before metric emission
[#154472241]
* Configure data_dir, uses new RABBITMQ_QUORUM_BASE env var
[#154472152]
* Use untracked enqueues when sending wihtout channel
Updated several other calls missed during the quorum implementation
* Revert "Configure data_dir, uses new RABBITMQ_QUORUM_BASE env var"
This reverts commit f2261212410affecb238fcbd1fb451381aee4036.
* Configure data_dir, uses new RABBITMQ_QUORUM_DIR based on mnesia dir
[#154472152]
* Fix get_quorum_state
* Fix calculation of quorum pids
* Move all quorum queues code to its own module
[#154472241]
* Return an error when declaring a quorum queue with an incompatible argument
[#154521696]
* Cleanup of quorum queue state after queue delete
Also fixes some existing problems where the state wasn't properly
stored
[#155458625]
* Revert Revert "Declare a quorum queue using the queue.declare method"
* Remove duplicated state info
[#154472241]
* Start/stop multi-node quorum queue
[#154472231]
[#154472236]
* Restart nodes in a multi-node quorum cluster
[#154472238]
* Test restart and leadership takeover on multiple nodes
[#154472238]
* Wait for leader down after deleting a quorum cluster
It ensures an smooth delete-declare sequence without race
conditions. The test included here detected the situation before
the fix.
[#154472236]
* Populate quorum_mapping from mnesia when not available
Ensures that leader nodes that don't have direct requests can get
the mapping ra name -> queue name
* Cosmetics
* Do not emit core metrics if queue has just been deleted
* Use rabbit_mnesia:is_process_alive
Fixes bug introduced by cac9583e1bb2705be7f06c2ab7f416a75d11c875
[#154472231]
* Only try to report stats if quorum process is alive
* Implement cancel consumer callback
Deletes metrics and sends consumer deleted event
* Remove unnecessary trigger election call
ra:restart_node has already been called during the recovery
* Apply cancellation callback on node hosting the channel
* Cosmetics
* Read new fifo metrics which store directly total, ready and unack
* Implement basic.cancel for quorum queues
* Store leader in amqqueue record, report all in stats
[#154472407]
* Declare quorum queue in mnesia before starting the ra cluster
Record needs to be stored first to update the leader on ra effects
* Revert
* Purge quorum queues
[#154472182]
* Improve use of untracked_enqueue
Choose the persisted leader id instead of just using the id of the
leader at point of creation.
* Store quorum leader in the pid field of amqqueue record
Same as mirrored queues, no real need for an additional field
* Improve recovery
When a ra node has never been started on a rabbit node ensure it doesn't
fail but instead rebuilds the config and starts the node as a new node.
Also fix issue when a quorum queue is declared when one of it's rabbit
nodes are unavailable.
[#157054606]
* Cleanup core metrics after leader change
[#157054473]
* Return an error on sync_queue on quorum queues
[#154472334]
* Return an error on cancel_sync_queue on quorum queues
[#154472337]
* Fix basic_cancel and basic_consume return values
Ensure the quorum queue state is always returned by these functions.
* Restore arity of amqqeueu delete and purge functions.
This avoids some breaking changes in the cli.
* Fix bug returning consumers.
* remove rogue debug log
* Integrate ingress flow control with quorum queues
[#157000583]
* Configure commands soft limit
[#157000583]
* Support quorum pids on rabbit_mnesia:is_process_alive
* Publish consumers metric for quorum queues
* Whitelist quorum directory in is_virgin_node
Allow the quorum directoy to exist without affecting the status of the
Rabbit node.
* Delete queue_metrics on leader change.
Also run the become_leader handler in a separate process to avoid
blocking.
[#157424225]
* Report cluster status in quorum queue infos. New per node status command.
Related to
[#157146500]
* Remove quorum_mapping table
As we can store the full queue name resource as the cluster id of the
ra_fifo_client state we can avoid needed the quorum_mapping table.
* Fix xref issue
* Provide quorum members information in stats
[#157146500]
* fix unused variable
* quorum queue multiple declare handling
Extend rabbit_amqqueue:internal_declare/2 to indicate if the queue
record was created or exisiting. From this we can then provide a code
path that should handle concurrent queue declares of the same quorum
queue.
* Return an error when declaring exclusive/auto-delete quorum queue
[#157472160]
* Restore lost changes
from 79c9bd201e1eac006a42bd162e7c86df96496629
* recover another part of commit
* fixup cherry pick
* Ra io/file metrics handler and stats publishing
[#157193081]
* Revert "Ra io/file metrics handler and stats publishing"
This reverts commit 05d15c786540322583fc655709825db215b70952.
* Do not issue confirms on node down for quorum queues.
Only a ra_event should be used to issue positive confirms for a quorum
queue.
* Ra stats publishing
[#157193081]
* Pick consumer utilisation from ra data
[#155402726]
* Handle error when deleting a quorum queue and all nodes are already down
This is in fact a successful deletion as all raft nodes are already 'stopped'
[#158656366]
* Return an error when declaring non-durable quorum queues
[#158656454]
* Rename dirty_query to committed_query
* Delete stats on leader node
[#158661152]
* Give full list of nodes to fifo client
* Handle timeout in quorum basic_get
* Fix unused variable error
* Handle timeout in basic get
[#158656366]
* Force GC after purge
[#158789389]
* Increase `ra:delete_cluster` timeout to 120s
* Revert "Force GC after purge"
This reverts commit 5c98bf22994eb39004760799d3a2c5041d16e9d4.
* Add quorum member command
[#157481599]
* Delete quorum member command
[#157481599]
* Implement basic.recover for quorum queues
[#157597411]
* Change concumer utilisation
to use the new ra_fifo table and api.
* Set max quorum queue size limit
Defaults to 7, can be configured per queue on queue.declare
Nodes are selected randomly from the list of nodes, but the one
that is executing the queue.declare command
[#159338081]
* remove potentially unrelated changes to rabbit_networking
* Move ra_fifo to rabbit
Copied ra_fifo to rabbit and renamed it rabbit_fifo.
[#159338031]
* rabbit_fifo tidy up
* rabbit_fifo tidy up
* rabbit_fifo: customer -> consumer rename
* Move ra_fifo tests
[#159338031]
* Tweak quorum_queue defaults
* quorum_queue test reliability
* Optimise quorum_queue test suite.
By only starting a rabbit cluster per group rather than test.
[#160612638]
* Renamings in line with ra API changes
* rabbit_fifo fixes
* Update with ra API changes
Ra has consolidated and simplified it's api. These changes update to
confirm to that.
* Update rabbit_fifo with latest ra changes
* Clean up out of date comment
* Return map of states
* Add test case for basic.get on an empty queue
Before the previous patch, any subsequent basic.get would crash as
the map of states had been replaced by a single state.
* Clarify use of deliver tags on record_sent
* Clean up queues after testcase
* Remove erlang monitor of quorum queues in rabbit_channel
The eol event can be used instead
* Use macros to make clearer distinctions between quorum/classic queues
Cosmetic only
* Erase queue stats on 'eol' event
* Update to follow Ra's cluster_id -> cluster_name rename.
* Rename qourum-cluster-size
To quorum-initial-group-size
* Issue confirms on quorum queue eol
Also avoid creating quorum queue session state on queue operation
methods.
* Only classic queues should be notified on channel down
* Quorum queues do not support global qos
Exit with protocol error of a basic.consume for a quorum queue is issued
on a channel with global qos enabled.
* unused variable name
* Refactoring
Strictly enfornce that channels do not monitor quorum queues.
* Refactor foreach_per_queue in the channel.
To make it call classic and quorum queues the same way.
[#161314899]
* rename function
* Query classic and quorum queues separately
during recovery as they should not be marked as stopped during failed
vhost recovery.
* Remove force_event_refresh function
As the only user of this function, the management API no longer requires
it.
* fix errors
* Remove created_at from amqqueue record
[#161343680]
* rabbit_fifo: support AMQP 1.0 consumer credit
This change implements an alternative consumer credit mechanism similar
to AMQP 1.0 link credit where the credit (prefetch) isn't automatically
topped up as deliveries are settled and instead needs to be manually
increased using a credit command. This is to be integrated with the AMQP
1.0 plugin.
[#161256187]
* Add basic.credit support for quorum queues.
Added support for AMQP 1.0 transfer flow control.
[#161256187]
* Make quorum queue recover idempotent
So that if a vhost crashes and runs the recover steps it doesn't fail
because ra servers are still running.
[#161343651]
* Add tests for vhost deletion
To ensure quorum queues are cleaned up on vhost removal.
Also fix xref issue.
[#161343673]
* remove unused clause
* always return latest value of queue
* Add rabbitmq-queues scripts. Remove ra config from .bat scripts.
* Return error if trying to get quorum status of a classic queue.
2018-10-29 17:47:29 +08:00
|
|
|
[ "x" = "x$RABBITMQ_QUORUM_DIR" ] && RABBITMQ_QUORUM_DIR=${RABBITMQ_MNESIA_DIR}/quorum
|
2016-02-02 18:59:56 +08:00
|
|
|
[ "x" = "x$RABBITMQ_GENERATED_CONFIG_DIR" ] && RABBITMQ_GENERATED_CONFIG_DIR=${GENERATED_CONFIG_DIR}
|
2016-03-17 17:32:14 +08:00
|
|
|
[ "x" = "x$RABBITMQ_ADVANCED_CONFIG_FILE" ] && RABBITMQ_ADVANCED_CONFIG_FILE=${ADVANCED_CONFIG_FILE}
|
2016-03-10 22:16:12 +08:00
|
|
|
[ "x" = "x$RABBITMQ_SCHEMA_DIR" ] && RABBITMQ_SCHEMA_DIR=${SCHEMA_DIR}
|
2016-09-12 21:44:23 +08:00
|
|
|
[ "x" = "x$RABBITMQ_IGNORE_SIGINT" ] && RABBITMQ_IGNORE_SIGINT="true"
|
2016-09-13 01:40:08 +08:00
|
|
|
[ "xtrue" = "x$RABBITMQ_IGNORE_SIGINT" ] && RABBITMQ_IGNORE_SIGINT_FLAG="+B i"
|
2014-07-03 19:08:05 +08:00
|
|
|
|
2015-04-21 16:59:55 +08:00
|
|
|
rmq_normalize_path_var \
|
|
|
|
RABBITMQ_CONFIG_FILE \
|
|
|
|
RABBITMQ_LOG_BASE \
|
|
|
|
RABBITMQ_MNESIA_BASE \
|
Quorum queues (#1706)
* Test queue.declare method with quorum type
[#154472130]
* Cosmetics
[#154472130]
* Start quorum queue
Includes ra as a rabbit dependency
[#154472152]
* Update info and list operations to use quorum queues
Basic implementation. Might need an update when more functionality
is added to the quorum queues.
[#154472152]
* Stop quorum queue
[#154472158]
* Restart quorum queue
[#154472164]
* Introduce UId in ra config to support newer version of ra
Improved ra stop
[#154472158]
* Put data inside VHost specific subdirs
[#154472164]
* Include ra in rabbit deps to support stop_app/start_app command
[#154472164]
* Stop quorum queues in `rabbit_amqqueue:stop/1`
[#154472158]
* Revert creation of fifo ets table inside rabbit
Now supported by ra
[#154472158]
* Filter quorum queues
[#154472158]
* Test restart node with quorum queues
[#154472164]
* Publish to quorum queues
[#154472174]
* Use `ra:restart_node/1`
[#154472164]
* Wait for stats to be published when querying quorum queues
[#154472174]
* Test publish and queue length after restart
[#154472174]
* Consume messages from quorum queues with basic.get
[#154472211]
* Autoack messages from quorum queues on basic.get
[#154472211]
* Fix no_ack meaning
no_ack = true is equivalent to autoack
[#154472211]
* Use data_dir as provided in the config
If we modify the data_dir, ra is not able to delete the data
when a queue is deleted
[#154472158]
* Remove unused code/variables
[#154472158]
* Subscribe to a quorum queue
Supports auto-ack
[#154472215]
* Ack messages consumed from quorum queues
[#154472221]
* Nack messages consumed from quorum queues
[#154804608]
* Use delivery tag as consumer tag for basic.get in quorum queues
[#154472221]
* Support for publisher confirms in quorum queues
[#154472198]
* Integrate with ra_fifo_client
* Clear queue state on queue.delete
[#154472158]
* Fix quorum nack
[#154804608]
* Test redelivery after nack
[#154804608]
* Nack without requeueing
[#154472225]
* Test multiple acks
[#154804208]
* Test multiple nacks
[#154804314]
* Configure dead letter exchange with queue declare
[#155076661]
* Use a per-vhost process to handle dead-lettering
Needs to hold state for quorum queues
[#155401802]
* Implement dead-lettering on nack'ed messages
[#154804620]
* Use queue name as a resource on message delivery
Fixes a previously introduced bug
[#154804608]
* Handle ra events on dead letter process
[#155401802]
* Pass empty queue states to queue delete
Queue deletion on vhost deletion calls directly to rabbit_amqqueue.
Queue states are not available, but we can provide an empty map as
in deletion the states are only needed for cleanup.
* Generate quorum queue stats and events
Consumer delete events are still pending, as depend on basic.cancel
(not implemented yet), ra terminating or ra detecting channel down
[#154472241]
* Ensure quorum mapping entries are available before metric emission
[#154472241]
* Configure data_dir, uses new RABBITMQ_QUORUM_BASE env var
[#154472152]
* Use untracked enqueues when sending wihtout channel
Updated several other calls missed during the quorum implementation
* Revert "Configure data_dir, uses new RABBITMQ_QUORUM_BASE env var"
This reverts commit f2261212410affecb238fcbd1fb451381aee4036.
* Configure data_dir, uses new RABBITMQ_QUORUM_DIR based on mnesia dir
[#154472152]
* Fix get_quorum_state
* Fix calculation of quorum pids
* Move all quorum queues code to its own module
[#154472241]
* Return an error when declaring a quorum queue with an incompatible argument
[#154521696]
* Cleanup of quorum queue state after queue delete
Also fixes some existing problems where the state wasn't properly
stored
[#155458625]
* Revert Revert "Declare a quorum queue using the queue.declare method"
* Remove duplicated state info
[#154472241]
* Start/stop multi-node quorum queue
[#154472231]
[#154472236]
* Restart nodes in a multi-node quorum cluster
[#154472238]
* Test restart and leadership takeover on multiple nodes
[#154472238]
* Wait for leader down after deleting a quorum cluster
It ensures an smooth delete-declare sequence without race
conditions. The test included here detected the situation before
the fix.
[#154472236]
* Populate quorum_mapping from mnesia when not available
Ensures that leader nodes that don't have direct requests can get
the mapping ra name -> queue name
* Cosmetics
* Do not emit core metrics if queue has just been deleted
* Use rabbit_mnesia:is_process_alive
Fixes bug introduced by cac9583e1bb2705be7f06c2ab7f416a75d11c875
[#154472231]
* Only try to report stats if quorum process is alive
* Implement cancel consumer callback
Deletes metrics and sends consumer deleted event
* Remove unnecessary trigger election call
ra:restart_node has already been called during the recovery
* Apply cancellation callback on node hosting the channel
* Cosmetics
* Read new fifo metrics which store directly total, ready and unack
* Implement basic.cancel for quorum queues
* Store leader in amqqueue record, report all in stats
[#154472407]
* Declare quorum queue in mnesia before starting the ra cluster
Record needs to be stored first to update the leader on ra effects
* Revert
* Purge quorum queues
[#154472182]
* Improve use of untracked_enqueue
Choose the persisted leader id instead of just using the id of the
leader at point of creation.
* Store quorum leader in the pid field of amqqueue record
Same as mirrored queues, no real need for an additional field
* Improve recovery
When a ra node has never been started on a rabbit node ensure it doesn't
fail but instead rebuilds the config and starts the node as a new node.
Also fix issue when a quorum queue is declared when one of it's rabbit
nodes are unavailable.
[#157054606]
* Cleanup core metrics after leader change
[#157054473]
* Return an error on sync_queue on quorum queues
[#154472334]
* Return an error on cancel_sync_queue on quorum queues
[#154472337]
* Fix basic_cancel and basic_consume return values
Ensure the quorum queue state is always returned by these functions.
* Restore arity of amqqeueu delete and purge functions.
This avoids some breaking changes in the cli.
* Fix bug returning consumers.
* remove rogue debug log
* Integrate ingress flow control with quorum queues
[#157000583]
* Configure commands soft limit
[#157000583]
* Support quorum pids on rabbit_mnesia:is_process_alive
* Publish consumers metric for quorum queues
* Whitelist quorum directory in is_virgin_node
Allow the quorum directoy to exist without affecting the status of the
Rabbit node.
* Delete queue_metrics on leader change.
Also run the become_leader handler in a separate process to avoid
blocking.
[#157424225]
* Report cluster status in quorum queue infos. New per node status command.
Related to
[#157146500]
* Remove quorum_mapping table
As we can store the full queue name resource as the cluster id of the
ra_fifo_client state we can avoid needed the quorum_mapping table.
* Fix xref issue
* Provide quorum members information in stats
[#157146500]
* fix unused variable
* quorum queue multiple declare handling
Extend rabbit_amqqueue:internal_declare/2 to indicate if the queue
record was created or exisiting. From this we can then provide a code
path that should handle concurrent queue declares of the same quorum
queue.
* Return an error when declaring exclusive/auto-delete quorum queue
[#157472160]
* Restore lost changes
from 79c9bd201e1eac006a42bd162e7c86df96496629
* recover another part of commit
* fixup cherry pick
* Ra io/file metrics handler and stats publishing
[#157193081]
* Revert "Ra io/file metrics handler and stats publishing"
This reverts commit 05d15c786540322583fc655709825db215b70952.
* Do not issue confirms on node down for quorum queues.
Only a ra_event should be used to issue positive confirms for a quorum
queue.
* Ra stats publishing
[#157193081]
* Pick consumer utilisation from ra data
[#155402726]
* Handle error when deleting a quorum queue and all nodes are already down
This is in fact a successful deletion as all raft nodes are already 'stopped'
[#158656366]
* Return an error when declaring non-durable quorum queues
[#158656454]
* Rename dirty_query to committed_query
* Delete stats on leader node
[#158661152]
* Give full list of nodes to fifo client
* Handle timeout in quorum basic_get
* Fix unused variable error
* Handle timeout in basic get
[#158656366]
* Force GC after purge
[#158789389]
* Increase `ra:delete_cluster` timeout to 120s
* Revert "Force GC after purge"
This reverts commit 5c98bf22994eb39004760799d3a2c5041d16e9d4.
* Add quorum member command
[#157481599]
* Delete quorum member command
[#157481599]
* Implement basic.recover for quorum queues
[#157597411]
* Change concumer utilisation
to use the new ra_fifo table and api.
* Set max quorum queue size limit
Defaults to 7, can be configured per queue on queue.declare
Nodes are selected randomly from the list of nodes, but the one
that is executing the queue.declare command
[#159338081]
* remove potentially unrelated changes to rabbit_networking
* Move ra_fifo to rabbit
Copied ra_fifo to rabbit and renamed it rabbit_fifo.
[#159338031]
* rabbit_fifo tidy up
* rabbit_fifo tidy up
* rabbit_fifo: customer -> consumer rename
* Move ra_fifo tests
[#159338031]
* Tweak quorum_queue defaults
* quorum_queue test reliability
* Optimise quorum_queue test suite.
By only starting a rabbit cluster per group rather than test.
[#160612638]
* Renamings in line with ra API changes
* rabbit_fifo fixes
* Update with ra API changes
Ra has consolidated and simplified it's api. These changes update to
confirm to that.
* Update rabbit_fifo with latest ra changes
* Clean up out of date comment
* Return map of states
* Add test case for basic.get on an empty queue
Before the previous patch, any subsequent basic.get would crash as
the map of states had been replaced by a single state.
* Clarify use of deliver tags on record_sent
* Clean up queues after testcase
* Remove erlang monitor of quorum queues in rabbit_channel
The eol event can be used instead
* Use macros to make clearer distinctions between quorum/classic queues
Cosmetic only
* Erase queue stats on 'eol' event
* Update to follow Ra's cluster_id -> cluster_name rename.
* Rename qourum-cluster-size
To quorum-initial-group-size
* Issue confirms on quorum queue eol
Also avoid creating quorum queue session state on queue operation
methods.
* Only classic queues should be notified on channel down
* Quorum queues do not support global qos
Exit with protocol error of a basic.consume for a quorum queue is issued
on a channel with global qos enabled.
* unused variable name
* Refactoring
Strictly enfornce that channels do not monitor quorum queues.
* Refactor foreach_per_queue in the channel.
To make it call classic and quorum queues the same way.
[#161314899]
* rename function
* Query classic and quorum queues separately
during recovery as they should not be marked as stopped during failed
vhost recovery.
* Remove force_event_refresh function
As the only user of this function, the management API no longer requires
it.
* fix errors
* Remove created_at from amqqueue record
[#161343680]
* rabbit_fifo: support AMQP 1.0 consumer credit
This change implements an alternative consumer credit mechanism similar
to AMQP 1.0 link credit where the credit (prefetch) isn't automatically
topped up as deliveries are settled and instead needs to be manually
increased using a credit command. This is to be integrated with the AMQP
1.0 plugin.
[#161256187]
* Add basic.credit support for quorum queues.
Added support for AMQP 1.0 transfer flow control.
[#161256187]
* Make quorum queue recover idempotent
So that if a vhost crashes and runs the recover steps it doesn't fail
because ra servers are still running.
[#161343651]
* Add tests for vhost deletion
To ensure quorum queues are cleaned up on vhost removal.
Also fix xref issue.
[#161343673]
* remove unused clause
* always return latest value of queue
* Add rabbitmq-queues scripts. Remove ra config from .bat scripts.
* Return error if trying to get quorum status of a classic queue.
2018-10-29 17:47:29 +08:00
|
|
|
RABBITMQ_MNESIA_DIR \
|
|
|
|
RABBITMQ_QUORUM_DIR
|
2015-04-21 16:59:55 +08:00
|
|
|
|
2018-09-06 22:49:19 +08:00
|
|
|
[ "x" = "x$RABBITMQ_PID_FILE" ] && RABBITMQ_PID_FILE="$PID_FILE"
|
|
|
|
|
|
|
|
if [ -n "$saved_RABBITMQ_PID_FILE" ] && \
|
|
|
|
[ "$saved_RABBITMQ_PID_FILE" != "$RABBITMQ_PID_FILE" ]
|
|
|
|
then
|
|
|
|
_rmq_env_pwarn 'RABBITMQ_PID_FILE was already set by the init script to:' \
|
|
|
|
"$saved_RABBITMQ_PID_FILE" \
|
|
|
|
'The value set in rabbitmq-env.conf is ignored because it would break the init script.'
|
|
|
|
|
|
|
|
RABBITMQ_PID_FILE="$saved_RABBITMQ_PID_FILE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Note: at this point, no RABBITMQ_PID_FILE is set so we use the mnesia dir value
|
|
|
|
[ "x" = "x$RABBITMQ_PID_FILE" ] && RABBITMQ_PID_FILE="${RABBITMQ_MNESIA_DIR}.pid"
|
|
|
|
|
2015-04-21 16:59:55 +08:00
|
|
|
rmq_normalize_path_var RABBITMQ_PID_FILE
|
2014-07-03 19:08:05 +08:00
|
|
|
|
2015-07-01 20:47:36 +08:00
|
|
|
[ "x" = "x$RABBITMQ_BOOT_MODULE" ] && RABBITMQ_BOOT_MODULE=${BOOT_MODULE}
|
|
|
|
|
2019-01-23 01:02:40 +08:00
|
|
|
[ "x" != "x$RABBITMQ_FEATURE_FLAGS_FILE" ] && RABBITMQ_FEATURE_FLAGS_FILE_source=environment
|
|
|
|
[ "x" = "x$RABBITMQ_FEATURE_FLAGS_FILE" ] && RABBITMQ_FEATURE_FLAGS_FILE=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME}-feature_flags
|
|
|
|
rmq_normalize_path_var RABBITMQ_FEATURE_FLAGS_FILE
|
|
|
|
|
2017-02-22 22:29:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_PLUGINS_EXPAND_DIR" ] && RABBITMQ_PLUGINS_EXPAND_DIR=${PLUGINS_EXPAND_DIR}
|
|
|
|
[ "x" = "x$RABBITMQ_PLUGINS_EXPAND_DIR" ] && RABBITMQ_PLUGINS_EXPAND_DIR=${RABBITMQ_MNESIA_BASE}/${RABBITMQ_NODENAME}-plugins-expand
|
|
|
|
rmq_normalize_path_var RABBITMQ_PLUGINS_EXPAND_DIR
|
|
|
|
|
2015-10-30 19:21:44 +08:00
|
|
|
[ "x" != "x$RABBITMQ_ENABLED_PLUGINS_FILE" ] && RABBITMQ_ENABLED_PLUGINS_FILE_source=environment
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_ENABLED_PLUGINS_FILE" ] && RABBITMQ_ENABLED_PLUGINS_FILE=${ENABLED_PLUGINS_FILE}
|
2015-04-21 16:59:55 +08:00
|
|
|
rmq_normalize_path_var RABBITMQ_ENABLED_PLUGINS_FILE
|
2014-07-03 19:08:05 +08:00
|
|
|
|
2015-10-30 19:21:44 +08:00
|
|
|
[ "x" != "x$RABBITMQ_PLUGINS_DIR" ] && RABBITMQ_PLUGINS_DIR_source=environment
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_PLUGINS_DIR" ] && RABBITMQ_PLUGINS_DIR=${PLUGINS_DIR}
|
2015-04-21 16:59:55 +08:00
|
|
|
rmq_normalize_path_var RABBITMQ_PLUGINS_DIR
|
2014-07-03 19:08:05 +08:00
|
|
|
|
|
|
|
## Log rotation
|
|
|
|
[ "x" = "x$RABBITMQ_LOGS" ] && RABBITMQ_LOGS=${LOGS}
|
Use Lager to log RabbitMQ messages
By default, RabbitMQ now logs messages to a single file
($RABBITMQ_LOGS). The $RABBITMQ_SASL_LOGS variable is unused. To
configure how and which messages are logged, it's recommended to do it
from rabbitmq.config, not from the environment variable.
The old `log_levels` parameter is unsupported and categories are
replaced by Lager extra sinks. If you had in your rabbitmq.config:
{rabbit, [
{log_levels, [{connection, info}]}
]}
You can now configure Lager like this:
{lager, [
{extra_sinks, [
{rabbit_connection_lager_event, [
{handlers, [{lager_forwarder_backend, [lager_event, info]}]}
]}
]}
]}
rabbitmq-build.mk from rabbitmq-common is included in the top-level
Makefile. It sets the appropriate compiler options to enable Lager's
lager_transform parse_transform module.
rabbit_log calls are now converted by this parse_transform to direct
calls to lager:log(). To keep backward compatibility with other plugins,
the rabbit_log module still implements all the <level>() functions.
Compared to the parse_transformed calls, the main difference is the
logged message does not carry the file:line metadata.
Fixes #94.
2015-12-05 01:07:00 +08:00
|
|
|
[ "x" != "x$RABBITMQ_LOGS" ] && export RABBITMQ_LOGS_source=environment
|
2014-07-03 19:08:05 +08:00
|
|
|
[ "x" = "x$RABBITMQ_LOGS" ] && RABBITMQ_LOGS="${RABBITMQ_LOG_BASE}/${RABBITMQ_NODENAME}.log"
|
2016-11-30 20:17:17 +08:00
|
|
|
[ "x" = "x$RABBITMQ_UPGRADE_LOG" ] && RABBITMQ_UPGRADE_LOG="${RABBITMQ_LOG_BASE}/${RABBITMQ_NODENAME}_upgrade.log"
|
2017-08-03 23:03:58 +08:00
|
|
|
[ "x" = "x$ERL_CRASH_DUMP" ] && ERL_CRASH_DUMP="${RABBITMQ_LOG_BASE}/erl_crash.dump"
|
2014-07-03 19:08:05 +08:00
|
|
|
|
2016-11-30 20:17:17 +08:00
|
|
|
rmq_normalize_path_var RABBITMQ_LOGS
|
|
|
|
|
|
|
|
rmq_normalize_path_var RABBITMQ_UPGRADE_LOG
|
2015-04-21 16:59:55 +08:00
|
|
|
|
2015-04-21 01:07:06 +08:00
|
|
|
# Check if files and directories non-related to Mnesia are configured
|
|
|
|
# to be in $RABBITMQ_MNESIA_DIR. If this is the case, issue a warning
|
|
|
|
# because it will prevent auto-clustering from working (the node will be
|
|
|
|
# considered non-virgin).
|
|
|
|
|
|
|
|
rmq_check_if_shared_with_mnesia \
|
|
|
|
RABBITMQ_CONFIG_FILE \
|
|
|
|
RABBITMQ_LOG_BASE \
|
|
|
|
RABBITMQ_PID_FILE \
|
2019-01-23 01:02:40 +08:00
|
|
|
RABBITMQ_FEATURE_FLAGS_FILE \
|
2017-02-22 22:29:05 +08:00
|
|
|
RABBITMQ_PLUGINS_EXPAND_DIR \
|
2015-04-21 01:07:06 +08:00
|
|
|
RABBITMQ_ENABLED_PLUGINS_FILE \
|
|
|
|
RABBITMQ_PLUGINS_DIR \
|
2016-11-30 20:17:17 +08:00
|
|
|
RABBITMQ_LOGS \
|
|
|
|
RABBITMQ_UPGRADE_LOG
|
2015-04-21 01:07:06 +08:00
|
|
|
|
2014-07-03 19:08:05 +08:00
|
|
|
##--- End of overridden <var_name> variables
|
2014-11-27 00:45:25 +08:00
|
|
|
|
2015-08-31 17:26:39 +08:00
|
|
|
## Development-specific environment.
|
2015-09-25 17:31:14 +08:00
|
|
|
if [ "${RABBITMQ_DEV_ENV}" ]; then
|
2019-01-23 01:02:40 +08:00
|
|
|
if [ "$RABBITMQ_FEATURE_FLAGS_FILE_source" != 'environment' -o \
|
|
|
|
"$RABBITMQ_PLUGINS_DIR_source" != 'environment' -o \
|
2016-11-07 20:03:18 +08:00
|
|
|
"$RABBITMQ_ENABLED_PLUGINS_FILE_source" != 'environment' ]; then
|
2015-09-25 18:05:42 +08:00
|
|
|
# We need to query the running node for the plugins directory
|
|
|
|
# and the "enabled plugins" file.
|
2019-02-20 22:08:00 +08:00
|
|
|
for arg in "$@"; do
|
|
|
|
case "$arg" in
|
|
|
|
-n)
|
|
|
|
next_is_node=1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test "$next_is_node"; then
|
|
|
|
# If the executed script is being passed a remote node
|
|
|
|
# name, use it here to query the remote node.
|
|
|
|
node_arg="-n $arg"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
eval $( (${RABBITMQ_SCRIPTS_DIR}/rabbitmqctl $node_arg eval \
|
2019-01-23 01:02:40 +08:00
|
|
|
'{ok, F} = application:get_env(rabbit, feature_flags_file),
|
|
|
|
{ok, P} = application:get_env(rabbit, plugins_dir),
|
2015-09-25 18:05:42 +08:00
|
|
|
{ok, E} = application:get_env(rabbit, enabled_plugins_file),
|
2017-05-30 17:23:29 +08:00
|
|
|
B = os:getenv("RABBITMQ_MNESIA_BASE"),
|
|
|
|
M = os:getenv("RABBITMQ_MNESIA_DIR"),
|
2015-09-25 18:05:42 +08:00
|
|
|
io:format(
|
2019-01-23 01:02:40 +08:00
|
|
|
"feature_flags_file=\"~s\"~n"
|
2015-09-25 18:05:42 +08:00
|
|
|
"plugins_dir=\"~s\"~n"
|
2017-05-30 17:23:29 +08:00
|
|
|
"enabled_plugins_file=\"~s\"~n"
|
|
|
|
"mnesia_base=\"~s\"~n"
|
2019-01-23 01:02:40 +08:00
|
|
|
"mnesia_dir=\"~s\"~n", [F, P, E, B, M]).' \
|
|
|
|
2>/dev/null | grep -E '^(feature_flags_file|plugins_dir|enabled_plugins_file|mnesia_base|mnesia_dir)=') || :)
|
|
|
|
|
|
|
|
if [ "${feature_flags_file}" -a \
|
|
|
|
"$RABBITMQ_FEATURE_FLAGS_FILE_source" != 'environment' ]; then
|
|
|
|
RABBITMQ_FEATURE_FLAGS_FILE="${feature_flags_file}"
|
|
|
|
fi
|
2015-10-30 19:21:44 +08:00
|
|
|
if [ "${plugins_dir}" -a \
|
|
|
|
"$RABBITMQ_PLUGINS_DIR_source" != 'environment' ]; then
|
2015-09-25 18:05:42 +08:00
|
|
|
RABBITMQ_PLUGINS_DIR="${plugins_dir}"
|
|
|
|
fi
|
2015-10-30 19:21:44 +08:00
|
|
|
if [ "${enabled_plugins_file}" -a \
|
|
|
|
"$RABBITMQ_ENABLED_PLUGINS_FILE_source" != 'environment' ]; then
|
2015-09-25 18:05:42 +08:00
|
|
|
RABBITMQ_ENABLED_PLUGINS_FILE="${enabled_plugins_file}"
|
|
|
|
fi
|
2017-05-30 17:23:29 +08:00
|
|
|
if [ "${mnesia_base}" -a \
|
|
|
|
"$RABBITMQ_MNESIA_BASE_source" != 'environment' ]; then
|
|
|
|
RABBITMQ_MNESIA_BASE="${mnesia_base}"
|
|
|
|
fi
|
|
|
|
if [ "${mnesia_dir}" -a \
|
|
|
|
"$RABBITMQ_MNESIA_DIR_source" != 'environment' ]; then
|
|
|
|
RABBITMQ_MNESIA_DIR="${mnesia_dir}"
|
|
|
|
fi
|
Quorum queues (#1706)
* Test queue.declare method with quorum type
[#154472130]
* Cosmetics
[#154472130]
* Start quorum queue
Includes ra as a rabbit dependency
[#154472152]
* Update info and list operations to use quorum queues
Basic implementation. Might need an update when more functionality
is added to the quorum queues.
[#154472152]
* Stop quorum queue
[#154472158]
* Restart quorum queue
[#154472164]
* Introduce UId in ra config to support newer version of ra
Improved ra stop
[#154472158]
* Put data inside VHost specific subdirs
[#154472164]
* Include ra in rabbit deps to support stop_app/start_app command
[#154472164]
* Stop quorum queues in `rabbit_amqqueue:stop/1`
[#154472158]
* Revert creation of fifo ets table inside rabbit
Now supported by ra
[#154472158]
* Filter quorum queues
[#154472158]
* Test restart node with quorum queues
[#154472164]
* Publish to quorum queues
[#154472174]
* Use `ra:restart_node/1`
[#154472164]
* Wait for stats to be published when querying quorum queues
[#154472174]
* Test publish and queue length after restart
[#154472174]
* Consume messages from quorum queues with basic.get
[#154472211]
* Autoack messages from quorum queues on basic.get
[#154472211]
* Fix no_ack meaning
no_ack = true is equivalent to autoack
[#154472211]
* Use data_dir as provided in the config
If we modify the data_dir, ra is not able to delete the data
when a queue is deleted
[#154472158]
* Remove unused code/variables
[#154472158]
* Subscribe to a quorum queue
Supports auto-ack
[#154472215]
* Ack messages consumed from quorum queues
[#154472221]
* Nack messages consumed from quorum queues
[#154804608]
* Use delivery tag as consumer tag for basic.get in quorum queues
[#154472221]
* Support for publisher confirms in quorum queues
[#154472198]
* Integrate with ra_fifo_client
* Clear queue state on queue.delete
[#154472158]
* Fix quorum nack
[#154804608]
* Test redelivery after nack
[#154804608]
* Nack without requeueing
[#154472225]
* Test multiple acks
[#154804208]
* Test multiple nacks
[#154804314]
* Configure dead letter exchange with queue declare
[#155076661]
* Use a per-vhost process to handle dead-lettering
Needs to hold state for quorum queues
[#155401802]
* Implement dead-lettering on nack'ed messages
[#154804620]
* Use queue name as a resource on message delivery
Fixes a previously introduced bug
[#154804608]
* Handle ra events on dead letter process
[#155401802]
* Pass empty queue states to queue delete
Queue deletion on vhost deletion calls directly to rabbit_amqqueue.
Queue states are not available, but we can provide an empty map as
in deletion the states are only needed for cleanup.
* Generate quorum queue stats and events
Consumer delete events are still pending, as depend on basic.cancel
(not implemented yet), ra terminating or ra detecting channel down
[#154472241]
* Ensure quorum mapping entries are available before metric emission
[#154472241]
* Configure data_dir, uses new RABBITMQ_QUORUM_BASE env var
[#154472152]
* Use untracked enqueues when sending wihtout channel
Updated several other calls missed during the quorum implementation
* Revert "Configure data_dir, uses new RABBITMQ_QUORUM_BASE env var"
This reverts commit f2261212410affecb238fcbd1fb451381aee4036.
* Configure data_dir, uses new RABBITMQ_QUORUM_DIR based on mnesia dir
[#154472152]
* Fix get_quorum_state
* Fix calculation of quorum pids
* Move all quorum queues code to its own module
[#154472241]
* Return an error when declaring a quorum queue with an incompatible argument
[#154521696]
* Cleanup of quorum queue state after queue delete
Also fixes some existing problems where the state wasn't properly
stored
[#155458625]
* Revert Revert "Declare a quorum queue using the queue.declare method"
* Remove duplicated state info
[#154472241]
* Start/stop multi-node quorum queue
[#154472231]
[#154472236]
* Restart nodes in a multi-node quorum cluster
[#154472238]
* Test restart and leadership takeover on multiple nodes
[#154472238]
* Wait for leader down after deleting a quorum cluster
It ensures an smooth delete-declare sequence without race
conditions. The test included here detected the situation before
the fix.
[#154472236]
* Populate quorum_mapping from mnesia when not available
Ensures that leader nodes that don't have direct requests can get
the mapping ra name -> queue name
* Cosmetics
* Do not emit core metrics if queue has just been deleted
* Use rabbit_mnesia:is_process_alive
Fixes bug introduced by cac9583e1bb2705be7f06c2ab7f416a75d11c875
[#154472231]
* Only try to report stats if quorum process is alive
* Implement cancel consumer callback
Deletes metrics and sends consumer deleted event
* Remove unnecessary trigger election call
ra:restart_node has already been called during the recovery
* Apply cancellation callback on node hosting the channel
* Cosmetics
* Read new fifo metrics which store directly total, ready and unack
* Implement basic.cancel for quorum queues
* Store leader in amqqueue record, report all in stats
[#154472407]
* Declare quorum queue in mnesia before starting the ra cluster
Record needs to be stored first to update the leader on ra effects
* Revert
* Purge quorum queues
[#154472182]
* Improve use of untracked_enqueue
Choose the persisted leader id instead of just using the id of the
leader at point of creation.
* Store quorum leader in the pid field of amqqueue record
Same as mirrored queues, no real need for an additional field
* Improve recovery
When a ra node has never been started on a rabbit node ensure it doesn't
fail but instead rebuilds the config and starts the node as a new node.
Also fix issue when a quorum queue is declared when one of it's rabbit
nodes are unavailable.
[#157054606]
* Cleanup core metrics after leader change
[#157054473]
* Return an error on sync_queue on quorum queues
[#154472334]
* Return an error on cancel_sync_queue on quorum queues
[#154472337]
* Fix basic_cancel and basic_consume return values
Ensure the quorum queue state is always returned by these functions.
* Restore arity of amqqeueu delete and purge functions.
This avoids some breaking changes in the cli.
* Fix bug returning consumers.
* remove rogue debug log
* Integrate ingress flow control with quorum queues
[#157000583]
* Configure commands soft limit
[#157000583]
* Support quorum pids on rabbit_mnesia:is_process_alive
* Publish consumers metric for quorum queues
* Whitelist quorum directory in is_virgin_node
Allow the quorum directoy to exist without affecting the status of the
Rabbit node.
* Delete queue_metrics on leader change.
Also run the become_leader handler in a separate process to avoid
blocking.
[#157424225]
* Report cluster status in quorum queue infos. New per node status command.
Related to
[#157146500]
* Remove quorum_mapping table
As we can store the full queue name resource as the cluster id of the
ra_fifo_client state we can avoid needed the quorum_mapping table.
* Fix xref issue
* Provide quorum members information in stats
[#157146500]
* fix unused variable
* quorum queue multiple declare handling
Extend rabbit_amqqueue:internal_declare/2 to indicate if the queue
record was created or exisiting. From this we can then provide a code
path that should handle concurrent queue declares of the same quorum
queue.
* Return an error when declaring exclusive/auto-delete quorum queue
[#157472160]
* Restore lost changes
from 79c9bd201e1eac006a42bd162e7c86df96496629
* recover another part of commit
* fixup cherry pick
* Ra io/file metrics handler and stats publishing
[#157193081]
* Revert "Ra io/file metrics handler and stats publishing"
This reverts commit 05d15c786540322583fc655709825db215b70952.
* Do not issue confirms on node down for quorum queues.
Only a ra_event should be used to issue positive confirms for a quorum
queue.
* Ra stats publishing
[#157193081]
* Pick consumer utilisation from ra data
[#155402726]
* Handle error when deleting a quorum queue and all nodes are already down
This is in fact a successful deletion as all raft nodes are already 'stopped'
[#158656366]
* Return an error when declaring non-durable quorum queues
[#158656454]
* Rename dirty_query to committed_query
* Delete stats on leader node
[#158661152]
* Give full list of nodes to fifo client
* Handle timeout in quorum basic_get
* Fix unused variable error
* Handle timeout in basic get
[#158656366]
* Force GC after purge
[#158789389]
* Increase `ra:delete_cluster` timeout to 120s
* Revert "Force GC after purge"
This reverts commit 5c98bf22994eb39004760799d3a2c5041d16e9d4.
* Add quorum member command
[#157481599]
* Delete quorum member command
[#157481599]
* Implement basic.recover for quorum queues
[#157597411]
* Change concumer utilisation
to use the new ra_fifo table and api.
* Set max quorum queue size limit
Defaults to 7, can be configured per queue on queue.declare
Nodes are selected randomly from the list of nodes, but the one
that is executing the queue.declare command
[#159338081]
* remove potentially unrelated changes to rabbit_networking
* Move ra_fifo to rabbit
Copied ra_fifo to rabbit and renamed it rabbit_fifo.
[#159338031]
* rabbit_fifo tidy up
* rabbit_fifo tidy up
* rabbit_fifo: customer -> consumer rename
* Move ra_fifo tests
[#159338031]
* Tweak quorum_queue defaults
* quorum_queue test reliability
* Optimise quorum_queue test suite.
By only starting a rabbit cluster per group rather than test.
[#160612638]
* Renamings in line with ra API changes
* rabbit_fifo fixes
* Update with ra API changes
Ra has consolidated and simplified it's api. These changes update to
confirm to that.
* Update rabbit_fifo with latest ra changes
* Clean up out of date comment
* Return map of states
* Add test case for basic.get on an empty queue
Before the previous patch, any subsequent basic.get would crash as
the map of states had been replaced by a single state.
* Clarify use of deliver tags on record_sent
* Clean up queues after testcase
* Remove erlang monitor of quorum queues in rabbit_channel
The eol event can be used instead
* Use macros to make clearer distinctions between quorum/classic queues
Cosmetic only
* Erase queue stats on 'eol' event
* Update to follow Ra's cluster_id -> cluster_name rename.
* Rename qourum-cluster-size
To quorum-initial-group-size
* Issue confirms on quorum queue eol
Also avoid creating quorum queue session state on queue operation
methods.
* Only classic queues should be notified on channel down
* Quorum queues do not support global qos
Exit with protocol error of a basic.consume for a quorum queue is issued
on a channel with global qos enabled.
* unused variable name
* Refactoring
Strictly enfornce that channels do not monitor quorum queues.
* Refactor foreach_per_queue in the channel.
To make it call classic and quorum queues the same way.
[#161314899]
* rename function
* Query classic and quorum queues separately
during recovery as they should not be marked as stopped during failed
vhost recovery.
* Remove force_event_refresh function
As the only user of this function, the management API no longer requires
it.
* fix errors
* Remove created_at from amqqueue record
[#161343680]
* rabbit_fifo: support AMQP 1.0 consumer credit
This change implements an alternative consumer credit mechanism similar
to AMQP 1.0 link credit where the credit (prefetch) isn't automatically
topped up as deliveries are settled and instead needs to be manually
increased using a credit command. This is to be integrated with the AMQP
1.0 plugin.
[#161256187]
* Add basic.credit support for quorum queues.
Added support for AMQP 1.0 transfer flow control.
[#161256187]
* Make quorum queue recover idempotent
So that if a vhost crashes and runs the recover steps it doesn't fail
because ra servers are still running.
[#161343651]
* Add tests for vhost deletion
To ensure quorum queues are cleaned up on vhost removal.
Also fix xref issue.
[#161343673]
* remove unused clause
* always return latest value of queue
* Add rabbitmq-queues scripts. Remove ra config from .bat scripts.
* Return error if trying to get quorum status of a classic queue.
2018-10-29 17:47:29 +08:00
|
|
|
if [ "${mnesia_dir}" -a \
|
|
|
|
"$RABBITMQ_QUORUM_DIR_source" != 'environment' ]; then
|
|
|
|
RABBITMQ_QUORUM_DIR="${mnesia_dir}/quorum"
|
|
|
|
fi
|
2015-09-25 18:05:42 +08:00
|
|
|
fi
|
|
|
|
|
2016-10-29 01:50:22 +08:00
|
|
|
if path_contains_existing_directory "${RABBITMQ_PLUGINS_DIR}" ; then
|
2015-10-20 21:42:59 +08:00
|
|
|
# RabbitMQ was started with "make run-broker" from its own
|
|
|
|
# source tree. Take rabbit_common from the plugins directory.
|
2015-09-25 16:23:37 +08:00
|
|
|
ERL_LIBS="${RABBITMQ_PLUGINS_DIR}:${ERL_LIBS}"
|
2015-10-20 21:42:59 +08:00
|
|
|
else
|
|
|
|
# RabbitMQ runs from a testsuite or a plugin. The .ez files are
|
|
|
|
# not available under RabbitMQ source tree. We need to look at
|
|
|
|
# $DEPS_DIR and default locations.
|
|
|
|
|
|
|
|
if [ "${DEPS_DIR}" -a -d "${DEPS_DIR}/rabbit_common/ebin" ]; then
|
|
|
|
# $DEPS_DIR is set, and it contains rabbitmq-common, use
|
|
|
|
# this.
|
|
|
|
DEPS_DIR_norm="${DEPS_DIR}"
|
|
|
|
elif [ -f "${RABBITMQ_SCRIPTS_DIR}/../../../erlang.mk" -a \
|
|
|
|
-d "${RABBITMQ_SCRIPTS_DIR}/../../rabbit_common/ebin" ]; then
|
|
|
|
# Look at default locations: "deps" subdirectory inside a
|
|
|
|
# plugin or the Umbrella.
|
|
|
|
DEPS_DIR_norm="${RABBITMQ_SCRIPTS_DIR}/../.."
|
|
|
|
fi
|
|
|
|
DEPS_DIR_norm=$(rmq_realpath "${DEPS_DIR_norm}")
|
|
|
|
|
2015-09-25 17:31:14 +08:00
|
|
|
ERL_LIBS="${DEPS_DIR_norm}:${ERL_LIBS}"
|
2015-08-31 17:26:39 +08:00
|
|
|
fi
|
2015-10-07 20:07:39 +08:00
|
|
|
else
|
2016-10-29 01:50:22 +08:00
|
|
|
if path_contains_existing_directory "${RABBITMQ_PLUGINS_DIR}" ; then
|
2015-10-07 20:07:39 +08:00
|
|
|
# RabbitMQ was started from its install directory. Take
|
|
|
|
# rabbit_common from the plugins directory.
|
|
|
|
ERL_LIBS="${RABBITMQ_PLUGINS_DIR}:${ERL_LIBS}"
|
|
|
|
fi
|
|
|
|
fi
|
2015-09-25 17:31:14 +08:00
|
|
|
|
2015-10-07 20:07:39 +08:00
|
|
|
ERL_LIBS=${ERL_LIBS%:}
|
|
|
|
if [ "$ERL_LIBS" ]; then
|
2015-09-02 00:30:45 +08:00
|
|
|
export ERL_LIBS
|
2015-08-31 17:26:39 +08:00
|
|
|
fi
|
|
|
|
|
2017-12-30 05:56:23 +08:00
|
|
|
run_escript()
|
|
|
|
{
|
|
|
|
escript_main="${1:?escript_main must be defined}"
|
|
|
|
shift
|
|
|
|
escript="${1:?escript must be defined}"
|
|
|
|
shift
|
|
|
|
|
2018-10-12 04:30:49 +08:00
|
|
|
# Important: do not quote RABBITMQ_CTL_ERL_ARGS as they must be
|
|
|
|
# word-split
|
2018-01-03 03:53:24 +08:00
|
|
|
# shellcheck disable=SC2086
|
2017-12-30 05:56:23 +08:00
|
|
|
exec "${ERL_DIR}erl" +B \
|
2018-10-12 04:30:49 +08:00
|
|
|
-boot "$CLEAN_BOOT_FILE" \
|
2017-12-30 05:56:23 +08:00
|
|
|
-noinput -noshell -hidden -smp enable \
|
2018-02-16 00:30:59 +08:00
|
|
|
$RABBITMQ_CTL_ERL_ARGS \
|
|
|
|
-kernel inet_dist_listen_min "$RABBITMQ_CTL_DIST_PORT_MIN" \
|
|
|
|
-kernel inet_dist_listen_max "$RABBITMQ_CTL_DIST_PORT_MAX" \
|
2017-12-30 05:56:23 +08:00
|
|
|
-sasl errlog_type error \
|
2018-10-12 04:30:49 +08:00
|
|
|
-mnesia dir "\"$RABBITMQ_MNESIA_DIR\"" \
|
2017-12-30 05:56:23 +08:00
|
|
|
-run escript start \
|
|
|
|
-escript main "$escript_main" \
|
|
|
|
-extra "$escript" "$@"
|
|
|
|
}
|
|
|
|
|
2015-04-08 17:52:50 +08:00
|
|
|
RABBITMQ_ENV_LOADED=1
|
|
|
|
|
2014-11-27 00:45:25 +08:00
|
|
|
# Since we source this elsewhere, don't accidentally stop execution
|
|
|
|
true
|