Hello community,
here is the log from the commit of package rabbitmq-server for openSUSE:Factory
checked in at 2019-12-07 15:08:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rabbitmq-server (Old)
and /work/SRC/openSUSE:Factory/.rabbitmq-server.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rabbitmq-server"
Sat Dec 7 15:08:17 2019 rev:54 rq:754700 version:3.7.23
Changes:
--------
--- /work/SRC/openSUSE:Factory/rabbitmq-server/rabbitmq-server.changes
2019-11-28 10:15:10.499637808 +0100
+++
/work/SRC/openSUSE:Factory/.rabbitmq-server.new.4691/rabbitmq-server.changes
2019-12-07 15:08:32.967853951 +0100
@@ -1,0 +2,10 @@
+Fri Dec 6 13:14:21 UTC 2019 - Gabriele Santomaggio <[email protected]>
+
+- Update to RabbitMQ version 3.7.23
+- Full release notes:
https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.23
+- RabbitMQ 3.7.23 is a maintenance release that focuses on bug fixes.
+- RabbitMQ 3.7.x series is supported through March 2020.
+- Per the new Erlang version support policy in effect starting with January
2019,
+ this release no longer supports Erlang/OTP 20.3.
+
+-------------------------------------------------------------------
@@ -6 +16 @@
-- RabbitMQ 3.7.21 is a maintenance release that focuses on bug fixes.
+- RabbitMQ 3.7.22 is a maintenance release that focuses on bug fixes.
Old:
----
rabbitmq-server-3.7.22.tar.xz
New:
----
rabbitmq-server-3.7.23.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rabbitmq-server.spec ++++++
--- /var/tmp/diff_new_pack.0JM4sA/_old 2019-12-07 15:08:35.179853638 +0100
+++ /var/tmp/diff_new_pack.0JM4sA/_new 2019-12-07 15:08:35.183853637 +0100
@@ -33,7 +33,7 @@
%define _make_args DESTDIR="%{buildroot}" PREFIX="%{_prefix}"
RMQ_ROOTDIR=%{_rabbit_libdir} RMQ_ERLAPP_DIR=%{_rabbit_erllibdir}
MAN_INSTALL_PATH="%{_mandir}" DOC_INSTALL_DIR=%{buildroot}/%{_docdir}
VERSION=%{version} V=1
Name: rabbitmq-server
-Version: 3.7.22
+Version: 3.7.23
Release: 0
Summary: A message broker supporting AMQP, STOMP and MQTT
License: MPL-1.1
++++++ rabbitmq-server-3.7.22.tar.xz -> rabbitmq-server-3.7.23.tar.xz ++++++
Binary files old/rabbitmq-server-3.7.22/deps/.hex/cache.ets and
new/rabbitmq-server-3.7.23/deps/.hex/cache.ets differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/amqp_client/src/amqp_channel_sup.erl
new/rabbitmq-server-3.7.23/deps/amqp_client/src/amqp_channel_sup.erl
--- old/rabbitmq-server-3.7.22/deps/amqp_client/src/amqp_channel_sup.erl
2019-11-27 05:54:19.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/amqp_client/src/amqp_channel_sup.erl
2019-11-29 19:33:04.000000000 +0100
@@ -47,12 +47,12 @@
%% Internal plumbing
%%---------------------------------------------------------------------------
-start_writer(_Sup, direct, [ConnPid, Node, User, VHost, Collector],
+start_writer(_Sup, direct, [ConnPid, Node, User, VHost, Collector, AmqpParams],
ConnName, ChNumber, ChPid) ->
{ok, RabbitCh} =
rpc:call(Node, rabbit_direct, start_channel,
[ChNumber, ChPid, ConnPid, ConnName, ?PROTOCOL, User,
- VHost, ?CLIENT_CAPABILITIES, Collector]),
+ VHost, ?CLIENT_CAPABILITIES, Collector, AmqpParams]),
RabbitCh;
start_writer(Sup, network, [Sock, FrameMax], ConnName, ChNumber, ChPid) ->
{ok, Writer} = supervisor2:start_child(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/amqp_client/src/amqp_direct_connection.erl
new/rabbitmq-server-3.7.23/deps/amqp_client/src/amqp_direct_connection.erl
--- old/rabbitmq-server-3.7.22/deps/amqp_client/src/amqp_direct_connection.erl
2019-11-27 05:54:19.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/amqp_client/src/amqp_direct_connection.erl
2019-11-29 19:33:04.000000000 +0100
@@ -62,8 +62,9 @@
open_channel_args(#state{node = Node,
user = User,
vhost = VHost,
- collector = Collector}) ->
- [self(), Node, User, VHost, Collector].
+ collector = Collector,
+ params = Params}) ->
+ [self(), Node, User, VHost, Collector, Params].
do(_Method, _State) ->
ok.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_channel.erl
new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_channel.erl
--- old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_channel.erl
2019-11-27 05:56:42.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_channel.erl
2019-12-02 06:46:38.000000000 +0100
@@ -56,7 +56,7 @@
-behaviour(gen_server2).
--export([start_link/11, do/2, do/3, do_flow/3, flush/1, shutdown/1]).
+-export([start_link/11, start_link/12, do/2, do/3, do_flow/3, flush/1,
shutdown/1]).
-export([send_command/2, deliver/4, deliver_reply/2,
send_credit_reply/2, send_drained/2]).
-export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1,
@@ -64,7 +64,6 @@
-export([refresh_config_local/0, ready_for_close/1]).
-export([refresh_interceptors/0]).
-export([force_event_refresh/1]).
--export([source/2]).
-export([init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2,
handle_info/2, handle_pre_hibernate/1, prioritise_call/4,
@@ -161,7 +160,8 @@
reply_consumer,
%% flow | noflow, see rabbitmq-server#114
delivery_flow,
- interceptor_state
+ interceptor_state,
+ authz_context
}).
@@ -227,6 +227,17 @@
rabbit_types:user(), rabbit_types:vhost(),
rabbit_framing:amqp_table(),
pid(), pid()) ->
rabbit_types:ok_pid_or_error().
+
+start_link(Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol, User,
+ VHost, Capabilities, CollectorPid, Limiter) ->
+ start_link(Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol,
User,
+ VHost, Capabilities, CollectorPid, Limiter, undefined).
+
+-spec start_link
+ (channel_number(), pid(), pid(), pid(), string(),
rabbit_types:protocol(),
+ rabbit_types:user(), rabbit_types:vhost(),
rabbit_framing:amqp_table(),
+ pid(), pid(), any()) ->
+ rabbit_types:ok_pid_or_error().
-spec do(pid(), rabbit_framing:amqp_method_record()) -> 'ok'.
-spec do
(pid(), rabbit_framing:amqp_method_record(),
@@ -259,10 +270,10 @@
%%----------------------------------------------------------------------------
start_link(Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol, User,
- VHost, Capabilities, CollectorPid, Limiter) ->
+ VHost, Capabilities, CollectorPid, Limiter, AmqpParams) ->
gen_server2:start_link(
?MODULE, [Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol,
- User, VHost, Capabilities, CollectorPid, Limiter], []).
+ User, VHost, Capabilities, CollectorPid, Limiter, AmqpParams],
[]).
do(Pid, Method) ->
rabbit_channel_common:do(Pid, Method).
@@ -423,18 +434,10 @@
[gen_server2:cast(C, {force_event_refresh, Ref}) || C <- list()],
ok.
--spec source(pid(), any()) -> any().
-
-source(Pid, Source) when is_pid(Pid) ->
- case erlang:is_process_alive(Pid) of
- true -> Pid ! {channel_source, Source};
- false -> {error, channel_terminated}
- end.
-
%%---------------------------------------------------------------------------
init([Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol, User, VHost,
- Capabilities, CollectorPid, LimiterPid]) ->
+ Capabilities, CollectorPid, LimiterPid, AmqpParams]) ->
process_flag(trap_exit, true),
?store_proc_name({ConnName, Channel}),
ok = pg_local:join(rabbit_channels, self()),
@@ -452,6 +455,7 @@
_ ->
Limiter0
end,
+ OptionalVariables =
extract_topic_variable_map_from_amqp_params(AmqpParams),
State = #ch{state = starting,
protocol = Protocol,
channel = Channel,
@@ -483,7 +487,8 @@
consumer_prefetch = Prefetch,
reply_consumer = none,
delivery_flow = Flow,
- interceptor_state = undefined},
+ interceptor_state = undefined,
+ authz_context = OptionalVariables},
State1 = State#ch{
interceptor_state = rabbit_channel_interceptor:init(State)},
State2 = rabbit_event:init_stats_timer(State1, #ch.stats_timer),
@@ -723,10 +728,7 @@
when is_reference(Ref) ->
rabbit_log_channel:warning("Channel ~p ignoring late answer ~p from ~p",
[Channel, LateAnswer, Node]),
- noreply(State);
-
-handle_info({channel_source, Source}, State = #ch{}) ->
- noreply(State#ch{source = Source}).
+ noreply(State).
handle_pre_hibernate(State) ->
ok = clear_permission_cache(),
@@ -849,11 +851,11 @@
check_read_permitted(Resource, User) ->
check_resource_access(User, Resource, read).
-check_write_permitted_on_topic(Resource, User, ConnPid, RoutingKey, ChSrc) ->
- check_topic_authorisation(Resource, User, ConnPid, RoutingKey, ChSrc,
write).
+check_write_permitted_on_topic(Resource, User, RoutingKey, AuthzContext) ->
+ check_topic_authorisation(Resource, User, RoutingKey, AuthzContext, write).
-check_read_permitted_on_topic(Resource, User, ConnPid, RoutingKey, ChSrc) ->
- check_topic_authorisation(Resource, User, ConnPid, RoutingKey, ChSrc,
read).
+check_read_permitted_on_topic(Resource, User, RoutingKey, AuthzContext) ->
+ check_topic_authorisation(Resource, User, RoutingKey, AuthzContext, read).
check_user_id_header(#'P_basic'{user_id = undefined}, _) ->
ok;
@@ -888,23 +890,11 @@
check_internal_exchange(_) ->
ok.
-check_topic_authorisation(Resource = #exchange{type = topic},
- User, none, RoutingKey, _ChSrc, Permission) ->
- %% Called from outside the channel by mgmt API
- AmqpParams = [],
- check_topic_authorisation(Resource, User, AmqpParams, RoutingKey,
Permission);
-check_topic_authorisation(Resource = #exchange{type = topic},
- User, ConnPid, RoutingKey, ChSrc, Permission) when
is_pid(ConnPid) ->
- AmqpParams = get_amqp_params(ConnPid, ChSrc),
- check_topic_authorisation(Resource, User, AmqpParams, RoutingKey,
Permission);
-check_topic_authorisation(_, _, _, _, _, _) ->
- ok.
-
check_topic_authorisation(#exchange{name = Name = #resource{virtual_host =
VHost}, type = topic},
User = #user{username = Username},
- AmqpParams, RoutingKey, Permission) ->
+ RoutingKey, AuthzContext, Permission) ->
Resource = Name#resource{kind = topic},
- VariableMap = build_topic_variable_map(AmqpParams, VHost, Username),
+ VariableMap = build_topic_variable_map(AuthzContext, VHost, Username),
Context = #{routing_key => RoutingKey,
variable_map => VariableMap},
Cache = case get(topic_permission_cache) of
@@ -917,31 +907,27 @@
User, Resource, Permission, Context),
CacheTail = lists:sublist(Cache, ?MAX_PERMISSION_CACHE_SIZE-1),
put(topic_permission_cache, [{Resource, Context, Permission} |
CacheTail])
- end.
+ end;
+check_topic_authorisation(_, _, _, _, _) ->
+ ok.
-get_amqp_params(_ConnPid, rabbit_reader) -> [];
-get_amqp_params(ConnPid, _Any) when is_pid(ConnPid) ->
- Timeout = get_operation_timeout(),
- get_amqp_params(ConnPid, rabbit_misc:is_process_alive(ConnPid), Timeout).
-get_amqp_params(ConnPid, false, _Timeout) ->
- %% Connection process is dead
- rabbit_log_channel:debug("file ~p, line ~p - connection process not alive:
~p~n",
- [?FILE, ?LINE, ConnPid]),
- [];
-get_amqp_params(ConnPid, true, Timeout) ->
- rabbit_amqp_connection:amqp_params(ConnPid, Timeout).
-
-build_topic_variable_map(AmqpParams, VHost, Username) ->
- VariableFromAmqpParams =
extract_topic_variable_map_from_amqp_params(AmqpParams),
- maps:merge(VariableFromAmqpParams, #{<<"vhost">> => VHost, <<"username">>
=> Username}).
-
-%% use tuple representation of amqp_params to avoid coupling.
-%% get variable map only from amqp_params_direct, not amqp_params_network.
-%% amqp_params_direct are usually used from plugins (e.g. MQTT, STOMP)
-extract_topic_variable_map_from_amqp_params([{amqp_params,
{amqp_params_direct, _, _, _, _,
- {amqp_adapter_info,
_,_,_,_,_,_,AdditionalInfo}, _}}]) ->
+build_topic_variable_map(AuthzContext, VHost, Username) when
is_map(AuthzContext) ->
+ maps:merge(AuthzContext, #{<<"vhost">> => VHost, <<"username">> =>
Username});
+build_topic_variable_map(AuthzContext, VHost, Username) ->
+ maps:merge(extract_topic_variable_map_from_amqp_params(AuthzContext),
#{<<"vhost">> => VHost, <<"username">> => Username}).
+
+%% Use tuple representation of amqp_params to avoid a dependency on
amqp_client.
+%% Extracts variable map only from amqp_params_direct, not amqp_params_network.
+%% amqp_params_direct records are usually used by plugins (e.g. MQTT, STOMP)
+extract_topic_variable_map_from_amqp_params({amqp_params, {amqp_params_direct,
_, _, _, _,
+
{amqp_adapter_info, _,_,_,_,_,_,AdditionalInfo}, _}}) ->
proplists:get_value(variable_map, AdditionalInfo, #{});
+extract_topic_variable_map_from_amqp_params({amqp_params_direct, _, _, _, _,
+ {amqp_adapter_info,
_,_,_,_,_,_,AdditionalInfo}, _}) ->
+ proplists:get_value(variable_map, AdditionalInfo, #{});
+extract_topic_variable_map_from_amqp_params([Value]) ->
+ extract_topic_variable_map_from_amqp_params(Value);
extract_topic_variable_map_from_amqp_params(_) ->
#{}.
@@ -1132,14 +1118,13 @@
user = #user{username =
Username} = User,
conn_name = ConnName,
delivery_flow = Flow,
- conn_pid = ConnPid,
- source = ChSrc}) ->
+ authz_context = AuthzContext}) ->
check_msg_size(Content),
ExchangeName = rabbit_misc:r(VHostPath, exchange, ExchangeNameBin),
check_write_permitted(ExchangeName, User),
Exchange = rabbit_exchange:lookup_or_die(ExchangeName),
check_internal_exchange(Exchange),
- check_write_permitted_on_topic(Exchange, User, ConnPid, RoutingKey, ChSrc),
+ check_write_permitted_on_topic(Exchange, User, RoutingKey, AuthzContext),
%% We decode the content's properties here because we're almost
%% certain to want to look at delivery-mode and priority.
DecodedContent = #content {properties = Props} =
@@ -1415,84 +1400,84 @@
user = User,
queue_collector_pid = CollectorPid,
conn_pid = ConnPid,
- source = ChSrc}) ->
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ authz_context = AuthzContext}) ->
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, NoWait, #'exchange.declare_ok'{});
handle_method(#'exchange.delete'{nowait = NoWait} = Method,
_, State = #ch{conn_pid = ConnPid,
- source = ChSrc,
+ authz_context = AuthzContext,
virtual_host = VHostPath,
queue_collector_pid = CollectorPid,
user = User}) ->
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, NoWait, #'exchange.delete_ok'{});
handle_method(#'exchange.bind'{nowait = NoWait} = Method,
_, State = #ch{virtual_host = VHostPath,
conn_pid = ConnPid,
- source = ChSrc,
+ authz_context = AuthzContext,
queue_collector_pid = CollectorPid,
user = User}) ->
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, NoWait, #'exchange.bind_ok'{});
handle_method(#'exchange.unbind'{nowait = NoWait} = Method,
_, State = #ch{virtual_host = VHostPath,
conn_pid = ConnPid,
- source = ChSrc,
+ authz_context = AuthzContext,
queue_collector_pid = CollectorPid,
user = User}) ->
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, NoWait, #'exchange.unbind_ok'{});
handle_method(#'queue.declare'{nowait = NoWait} = Method,
_, State = #ch{virtual_host = VHostPath,
conn_pid = ConnPid,
- source = ChSrc,
+ authz_context = AuthzContext,
queue_collector_pid = CollectorPid,
user = User}) ->
{ok, QueueName, MessageCount, ConsumerCount} =
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_queue_declare_ok(QueueName, NoWait, MessageCount,
ConsumerCount, State);
handle_method(#'queue.delete'{nowait = NoWait} = Method, _,
- State = #ch{conn_pid = ConnPid,
- source = ChSrc,
- virtual_host = VHostPath,
+ State = #ch{conn_pid = ConnPid,
+ authz_context = AuthzContext,
+ virtual_host = VHostPath,
queue_collector_pid = CollectorPid,
user = User}) ->
{ok, PurgedMessageCount} =
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, NoWait,
#'queue.delete_ok'{message_count = PurgedMessageCount});
handle_method(#'queue.bind'{nowait = NoWait} = Method, _,
- State = #ch{conn_pid = ConnPid,
- source = ChSrc,
- user = User,
+ State = #ch{conn_pid = ConnPid,
+ authz_context = AuthzContext,
+ user = User,
queue_collector_pid = CollectorPid,
virtual_host = VHostPath}) ->
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, NoWait, #'queue.bind_ok'{});
handle_method(#'queue.unbind'{} = Method, _,
- State = #ch{conn_pid = ConnPid,
- source = ChSrc,
- user = User,
+ State = #ch{conn_pid = ConnPid,
+ authz_context = AuthzContext,
+ user = User,
queue_collector_pid = CollectorPid,
virtual_host = VHostPath}) ->
- handle_method(Method, ConnPid, ChSrc, CollectorPid, VHostPath, User),
+ handle_method(Method, ConnPid, AuthzContext, CollectorPid, VHostPath,
User),
return_ok(State, false, #'queue.unbind_ok'{});
handle_method(#'queue.purge'{nowait = NoWait} = Method,
- _, State = #ch{conn_pid = ConnPid,
- source = ChSrc,
- user = User,
+ _, State = #ch{conn_pid = ConnPid,
+ authz_context = AuthzContext,
+ user = User,
queue_collector_pid = CollectorPid,
virtual_host = VHostPath}) ->
- case handle_method(Method, ConnPid, ChSrc, CollectorPid,
+ case handle_method(Method, ConnPid, AuthzContext, CollectorPid,
VHostPath, User) of
{ok, PurgedMessageCount} ->
return_ok(State, NoWait,
@@ -1692,7 +1677,7 @@
State#ch{delivering_queues = sets:del_element(QPid, DQ)}.
binding_action(Fun, SourceNameBin0, DestinationType, DestinationNameBin0,
- RoutingKey, Arguments, VHostPath, ConnPid, ChSrc,
+ RoutingKey, Arguments, VHostPath, ConnPid, AuthzContext,
#user{username = Username} = User) ->
ExchangeNameBin = strip_cr_lf(SourceNameBin0),
DestinationNameBin = strip_cr_lf(DestinationNameBin0),
@@ -1705,7 +1690,7 @@
{error, not_found} ->
ok;
{ok, Exchange} ->
- check_read_permitted_on_topic(Exchange, User, ConnPid, RoutingKey,
ChSrc)
+ check_read_permitted_on_topic(Exchange, User, RoutingKey,
AuthzContext)
end,
case Fun(#binding{source = ExchangeName,
destination = DestinationName,
@@ -2085,7 +2070,6 @@
i(vhost, #ch{virtual_host = VHost}) -> VHost;
i(transactional, #ch{tx = Tx}) -> Tx =/= none;
i(confirm, #ch{confirm_enabled = CE}) -> CE;
-i(source, #ch{source = ChSrc}) -> ChSrc;
i(name, State) -> name(State);
i(consumer_count, #ch{consumer_mapping = CM}) -> maps:size(CM);
i(messages_unconfirmed, #ch{unconfirmed = UC}) -> dtree:size(UC);
@@ -2157,39 +2141,39 @@
source = SourceNameBin,
routing_key = RoutingKey,
arguments = Arguments},
- ConnPid, ChSrc, _CollectorId, VHostPath, User) ->
+ ConnPid, AuthzContext, _CollectorId, VHostPath, User) ->
binding_action(fun rabbit_binding:add/3,
SourceNameBin, exchange, DestinationNameBin,
- RoutingKey, Arguments, VHostPath, ConnPid, ChSrc, User);
+ RoutingKey, Arguments, VHostPath, ConnPid, AuthzContext,
User);
handle_method(#'exchange.unbind'{destination = DestinationNameBin,
source = SourceNameBin,
routing_key = RoutingKey,
arguments = Arguments},
- ConnPid, ChSrc, _CollectorId, VHostPath, User) ->
+ ConnPid, AuthzContext, _CollectorId, VHostPath, User) ->
binding_action(fun rabbit_binding:remove/3,
SourceNameBin, exchange, DestinationNameBin,
- RoutingKey, Arguments, VHostPath, ConnPid, ChSrc, User);
+ RoutingKey, Arguments, VHostPath, ConnPid,
AuthzContext, User);
handle_method(#'queue.unbind'{queue = QueueNameBin,
exchange = ExchangeNameBin,
routing_key = RoutingKey,
arguments = Arguments},
- ConnPid, ChSrc, _CollectorId, VHostPath, User) ->
+ ConnPid, AuthzContext, _CollectorId, VHostPath, User) ->
binding_action(fun rabbit_binding:remove/3,
ExchangeNameBin, queue, QueueNameBin,
- RoutingKey, Arguments, VHostPath, ConnPid, ChSrc, User);
+ RoutingKey, Arguments, VHostPath, ConnPid, AuthzContext,
User);
handle_method(#'queue.bind'{queue = QueueNameBin,
exchange = ExchangeNameBin,
routing_key = RoutingKey,
arguments = Arguments},
- ConnPid, ChSrc, _CollectorId, VHostPath, User) ->
+ ConnPid, AuthzContext, _CollectorId, VHostPath, User) ->
binding_action(fun rabbit_binding:add/3,
ExchangeNameBin, queue, QueueNameBin,
- RoutingKey, Arguments, VHostPath, ConnPid, ChSrc, User);
+ RoutingKey, Arguments, VHostPath, ConnPid, AuthzContext,
User);
%% Note that all declares to these are effectively passive. If it
%% exists it by definition has one consumer.
handle_method(#'queue.declare'{queue = <<"amq.rabbitmq.reply-to",
_/binary>> = QueueNameBin},
- _ConnPid, _ChSrc, _CollectorPid, VHost, _User) ->
+ _ConnPid, _AuthzContext, _CollectorPid, VHost, _User) ->
StrippedQueueNameBin = strip_cr_lf(QueueNameBin),
QueueName = rabbit_misc:r(VHost, queue, StrippedQueueNameBin),
case declare_fast_reply_to(StrippedQueueNameBin) of
@@ -2203,7 +2187,7 @@
auto_delete = AutoDelete,
nowait = NoWait,
arguments = Args} = Declare,
- ConnPid, ChSrc, CollectorPid, VHostPath,
+ ConnPid, AuthzContext, CollectorPid, VHostPath,
#user{username = Username} = User) ->
Owner = case ExclusiveDeclare of
true -> ConnPid;
@@ -2261,7 +2245,7 @@
{existing, _Q} ->
%% must have been created between the stat and the
%% declare. Loop around again.
- handle_method(Declare, ConnPid, ChSrc, CollectorPid,
VHostPath,
+ handle_method(Declare, ConnPid, AuthzContext,
CollectorPid, VHostPath,
User);
{absent, Q, Reason} ->
rabbit_misc:absent(Q, Reason);
@@ -2277,7 +2261,7 @@
handle_method(#'queue.declare'{queue = QueueNameBin,
nowait = NoWait,
passive = true},
- ConnPid, _ChSrc, _CollectorPid, VHostPath, _User) ->
+ ConnPid, _AuthzContext, _CollectorPid, VHostPath, _User) ->
StrippedQueueNameBin = strip_cr_lf(QueueNameBin),
QueueName = rabbit_misc:r(VHostPath, queue, StrippedQueueNameBin),
{{ok, MessageCount, ConsumerCount}, #amqqueue{} = Q} =
@@ -2288,7 +2272,7 @@
handle_method(#'queue.delete'{queue = QueueNameBin,
if_unused = IfUnused,
if_empty = IfEmpty},
- ConnPid, _ChSrc, _CollectorPid, VHostPath,
+ ConnPid, _AuthzContext, _CollectorPid, VHostPath,
User = #user{username = Username}) ->
StrippedQueueNameBin = strip_cr_lf(QueueNameBin),
QueueName = qbin_to_resource(StrippedQueueNameBin, VHostPath),
@@ -2316,7 +2300,7 @@
end;
handle_method(#'exchange.delete'{exchange = ExchangeNameBin,
if_unused = IfUnused},
- _ConnPid, _ChSrc, _CollectorPid, VHostPath,
+ _ConnPid, _AuthzContext, _CollectorPid, VHostPath,
User = #user{username = Username}) ->
StrippedExchangeNameBin = strip_cr_lf(ExchangeNameBin),
ExchangeName = rabbit_misc:r(VHostPath, exchange, StrippedExchangeNameBin),
@@ -2332,7 +2316,7 @@
ok
end;
handle_method(#'queue.purge'{queue = QueueNameBin},
- ConnPid, _ChSrc, _CollectorPid, VHostPath, User) ->
+ ConnPid, _AuthzContext, _CollectorPid, VHostPath, User) ->
QueueName = qbin_to_resource(QueueNameBin, VHostPath),
check_read_permitted(QueueName, User),
rabbit_amqqueue:with_exclusive_access_or_die(
@@ -2345,7 +2329,7 @@
auto_delete = AutoDelete,
internal = Internal,
arguments = Args},
- _ConnPid, _ChSrc, _CollectorPid, VHostPath,
+ _ConnPid, _AuthzContext, _CollectorPid, VHostPath,
#user{username = Username} = User) ->
CheckedType = rabbit_exchange:check_type(TypeNameBin),
ExchangeName = rabbit_misc:r(VHostPath, exchange,
strip_cr_lf(ExchangeNameBin)),
@@ -2378,7 +2362,7 @@
AutoDelete, Internal, Args);
handle_method(#'exchange.declare'{exchange = ExchangeNameBin,
passive = true},
- _ConnPid, _ChSrc, _CollectorPid, VHostPath, _User) ->
+ _ConnPid, _AuthzContext, _CollectorPid, VHostPath, _User) ->
ExchangeName = rabbit_misc:r(VHostPath, exchange,
strip_cr_lf(ExchangeNameBin)),
check_not_default_exchange(ExchangeName),
_ = rabbit_exchange:lookup_or_die(ExchangeName).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_channel_sup.erl
new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_channel_sup.erl
--- old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_channel_sup.erl
2019-11-27 05:56:42.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_channel_sup.erl
2019-12-02 06:46:38.000000000 +0100
@@ -71,7 +71,7 @@
{ok, AState} = rabbit_command_assembler:init(Protocol),
{ok, SupPid, {ChannelPid, AState}};
start_link({direct, Channel, ClientChannelPid, ConnPid, ConnName, Protocol,
- User, VHost, Capabilities, Collector}) ->
+ User, VHost, Capabilities, Collector, AmqpParams}) ->
{ok, SupPid} = supervisor2:start_link(
?MODULE, {direct, {ConnName, Channel}}),
[LimiterPid] = supervisor2:find_child(SupPid, limiter),
@@ -81,7 +81,7 @@
{channel, {rabbit_channel, start_link,
[Channel, ClientChannelPid, ClientChannelPid, ConnPid,
ConnName, Protocol, User, VHost, Capabilities, Collector,
- LimiterPid]},
+ LimiterPid, AmqpParams]},
intrinsic, ?FAIR_WAIT, worker, [rabbit_channel]}),
{ok, SupPid, {ChannelPid, none}}.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_direct.erl
new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_direct.erl
--- old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_direct.erl
2019-11-27 05:56:42.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_direct.erl
2019-12-02 06:46:38.000000000 +0100
@@ -17,7 +17,7 @@
-module(rabbit_direct).
-export([boot/0, force_event_refresh/1, list/0, connect/5,
- start_channel/9, disconnect/2]).
+ start_channel/10, disconnect/2]).
%% Internal
-export([list_local/0]).
@@ -44,7 +44,7 @@
-spec start_channel
(rabbit_channel:channel_number(), pid(), pid(), string(),
rabbit_types:protocol(), rabbit_types:user(), rabbit_types:vhost(),
- rabbit_framing:amqp_table(), pid()) ->
+ rabbit_framing:amqp_table(), pid(), any()) ->
{'ok', pid()}.
-spec disconnect(pid(), rabbit_event:event_props()) -> 'ok'.
@@ -202,13 +202,12 @@
end.
start_channel(Number, ClientChannelPid, ConnPid, ConnName, Protocol, User,
- VHost, Capabilities, Collector) ->
+ VHost, Capabilities, Collector, AmqpParams) ->
{ok, _, {ChannelPid, _}} =
supervisor2:start_child(
rabbit_direct_client_sup,
[{direct, Number, ClientChannelPid, ConnPid, ConnName, Protocol,
- User, VHost, Capabilities, Collector}]),
- _ = rabbit_channel:source(ChannelPid, ?MODULE),
+ User, VHost, Capabilities, Collector, AmqpParams}]),
{ok, ChannelPid}.
disconnect(Pid, Infos) ->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_reader.erl
new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_reader.erl
--- old/rabbitmq-server-3.7.22/deps/rabbit/src/rabbit_reader.erl
2019-11-27 05:56:42.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/rabbit/src/rabbit_reader.erl
2019-12-02 06:46:38.000000000 +0100
@@ -914,7 +914,6 @@
rabbit_channel_sup_sup:start_channel(
ChanSupSup, {tcp, Sock, Channel, FrameMax, self(), Name,
Protocol, User, VHost, Capabilities, Collector}),
- _ = rabbit_channel:source(ChPid, ?MODULE),
MRef = erlang:monitor(process, ChPid),
put({ch_pid, ChPid}, {Channel, MRef}),
put({channel, Channel}, {ChPid, AState}),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_local_alarms_command.ex
new/rabbitmq-server-3.7.23/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_local_alarms_command.ex
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_local_alarms_command.ex
2019-11-27 05:46:31.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_local_alarms_command.ex
2019-12-04 07:45:51.000000000 +0100
@@ -62,9 +62,9 @@
end
def output(alarms, %{node: node_name, formatter: "json"}) do
- {:ok,
+ {:error, :check_failed,
%{
- "result" => "ok",
+ "result" => "error",
"local" => alarm_lines(alarms, node_name),
"message" => "Node #{node_name} reported local alarms"
}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream.ex
new/rabbitmq-server-3.7.23/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream.ex
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream.ex
2019-11-27 05:46:31.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream.ex
1970-01-01 01:00:00.000000000 +0100
@@ -1,82 +0,0 @@
-## 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) 2019 Pivotal Software, Inc. All rights reserved.
-
-defmodule RabbitMQ.CLI.Diagnostics.Commands.LogTailStreamCommand do
- @moduledoc """
- Displays standard log file location on the target node
- """
- @behaviour RabbitMQ.CLI.CommandBehaviour
-
- alias RabbitMQ.CLI.Core.LogFiles
-
-
- def switches(), do: [duration: :integer, timeout: :integer]
- def aliases(), do: [d: :duration, t: :timeout]
-
- def merge_defaults(args, opts) do
- {args, Map.merge(%{duration: :infinity}, opts)}
- end
-
- use RabbitMQ.CLI.Core.AcceptsNoPositionalArguments
-
- def printer(), do: RabbitMQ.CLI.Printers.StdIORaw
-
- def run([], %{node: node_name, timeout: timeout, duration: duration}) do
- case LogFiles.get_default_log_location(node_name, timeout) do
- {:ok, file} ->
- pid = self()
- ref = make_ref()
- subscribed = :rabbit_misc.rpc_call(
- node_name,
- :rabbit_log_tail, :init_tail_stream,
- [file, pid, ref, duration],
- timeout)
- case subscribed do
- {:ok, ^ref} ->
- Stream.unfold(:confinue,
- fn(:finished) -> nil
- (:confinue) ->
- receive do
- {^ref, data, :finished} -> {data, :finished};
- {^ref, data, :confinue} -> {data, :confinue}
- end
- end)
- error -> error
- end
- error -> error
- end
- end
-
- use RabbitMQ.CLI.DefaultOutput
-
- def help_section(), do: :observability_and_health_checks
-
- def description(), do: "Streams logs from a running node for a period of
time"
-
- def usage, do: "log_tail_stream [--duration|-d <seconds>]"
-
- def usage_additional() do
- [
- ["<duration_in_seconds>", "duration in seconds to stream log. Defaults
to infinity"]
- ]
- end
-
- def banner([], %{node: node_name, duration: :infinity}) do
- "Streaming logs from node #{node_name} ..."
- end
- def banner([], %{node: node_name, duration: duration}) do
- "Streaming logs from node #{node_name} for #{duration} seconds ..."
- end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream_command.ex
new/rabbitmq-server-3.7.23/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream_command.ex
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream_command.ex
1970-01-01 01:00:00.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/log_tail_stream_command.ex
2019-12-04 07:45:51.000000000 +0100
@@ -0,0 +1,82 @@
+## 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) 2019 Pivotal Software, Inc. All rights reserved.
+
+defmodule RabbitMQ.CLI.Diagnostics.Commands.LogTailStreamCommand do
+ @moduledoc """
+ Displays standard log file location on the target node
+ """
+ @behaviour RabbitMQ.CLI.CommandBehaviour
+
+ alias RabbitMQ.CLI.Core.LogFiles
+
+
+ def switches(), do: [duration: :integer, timeout: :integer]
+ def aliases(), do: [d: :duration, t: :timeout]
+
+ def merge_defaults(args, opts) do
+ {args, Map.merge(%{duration: :infinity}, opts)}
+ end
+
+ use RabbitMQ.CLI.Core.AcceptsNoPositionalArguments
+
+ def printer(), do: RabbitMQ.CLI.Printers.StdIORaw
+
+ def run([], %{node: node_name, timeout: timeout, duration: duration}) do
+ case LogFiles.get_default_log_location(node_name, timeout) do
+ {:ok, file} ->
+ pid = self()
+ ref = make_ref()
+ subscribed = :rabbit_misc.rpc_call(
+ node_name,
+ :rabbit_log_tail, :init_tail_stream,
+ [file, pid, ref, duration],
+ timeout)
+ case subscribed do
+ {:ok, ^ref} ->
+ Stream.unfold(:confinue,
+ fn(:finished) -> nil
+ (:confinue) ->
+ receive do
+ {^ref, data, :finished} -> {data, :finished};
+ {^ref, data, :confinue} -> {data, :confinue}
+ end
+ end)
+ error -> error
+ end
+ error -> error
+ end
+ end
+
+ use RabbitMQ.CLI.DefaultOutput
+
+ def help_section(), do: :observability_and_health_checks
+
+ def description(), do: "Streams logs from a running node for a period of
time"
+
+ def usage, do: "log_tail_stream [--duration|-d <seconds>]"
+
+ def usage_additional() do
+ [
+ ["<duration_in_seconds>", "duration in seconds to stream log. Defaults
to infinity"]
+ ]
+ end
+
+ def banner([], %{node: node_name, duration: :infinity}) do
+ "Streaming logs from node #{node_name} ..."
+ end
+ def banner([], %{node: node_name, duration: duration}) do
+ "Streaming logs from node #{node_name} for #{duration} seconds ..."
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_management/src/rabbit_mgmt_util.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_management/src/rabbit_mgmt_util.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_management/src/rabbit_mgmt_util.erl
2019-11-27 06:11:36.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_management/src/rabbit_mgmt_util.erl
2019-12-02 06:44:11.000000000 +0100
@@ -776,7 +776,7 @@
Method = props_to_method(MethodName, Props, Transformers, Extra),
Node = get_node(Props),
case rabbit_misc:rpc_call(Node, rabbit_channel, handle_method,
- [Method, none, ?MODULE, none,
+ [Method, none, #{}, none,
VHost, User]) of
{badrpc, nodedown} ->
Msg = io_lib:format("Node ~p could not be contacted",
[Node]),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_common/src/rabbit_peer_discovery_util.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_common/src/rabbit_peer_discovery_util.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_common/src/rabbit_peer_discovery_util.erl
2019-11-27 05:48:27.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_common/src/rabbit_peer_discovery_util.erl
2019-12-03 15:57:34.000000000 +0100
@@ -28,7 +28,8 @@
parse_port/1,
as_proplist/1,
as_map/1,
- stringify_error/1
+ stringify_error/1,
+ maybe_backend_configured/4
]).
@@ -363,6 +364,25 @@
stringify_error({error, Term}) ->
{error, lists:flatten(io_lib:format("~p", [Term]))}.
+-spec maybe_backend_configured(BackendConfigKey :: atom(),
+ ClusterFormationUndefinedFun :: fun(() -> {ok,
term()} | ok),
+ BackendUndefinedFun :: fun(() -> {ok, term()} |
ok),
+ ConfiguredFun :: fun((list()) -> {ok, term()}))
-> {ok, term()}.
+maybe_backend_configured(BackendConfigKey,
+ ClusterFormationUndefinedFun,
+ BackendUndefinedFun,
+ ConfiguredFun) ->
+ case application:get_env(rabbit, cluster_formation) of
+ undefined ->
+ ClusterFormationUndefinedFun();
+ {ok, ClusterFormation} ->
+ case proplists:get_value(BackendConfigKey, ClusterFormation) of
+ undefined ->
+ BackendUndefinedFun();
+ Proplist ->
+ ConfiguredFun(Proplist)
+ end
+ end.
%%--------------------------------------------------------------------
%% @doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_consul/include/rabbit_peer_discovery_consul.hrl
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_consul/include/rabbit_peer_discovery_consul.hrl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_consul/include/rabbit_peer_discovery_consul.hrl
2019-11-27 05:48:38.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_consul/include/rabbit_peer_discovery_consul.hrl
2019-12-03 15:55:04.000000000 +0100
@@ -1,3 +1,5 @@
+-define(BACKEND_CONFIG_KEY, peer_discovery_consul).
+
-define(CONFIG_MAPPING,
#{
cluster_name =>
#peer_discovery_config_entry_meta{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_consul/src/rabbit_peer_discovery_consul.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_consul/src/rabbit_peer_discovery_consul.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_consul/src/rabbit_peer_discovery_consul.erl
2019-11-27 05:48:38.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_consul/src/rabbit_peer_discovery_consul.erl
2019-12-03 15:55:04.000000000 +0100
@@ -36,8 +36,6 @@
-define(CONFIG_MODULE, rabbit_peer_discovery_config).
-define(UTIL_MODULE, rabbit_peer_discovery_util).
--define(BACKEND_CONFIG_KEY, peer_discovery_consul).
-
-define(CONSUL_CHECK_NOTES, "RabbitMQ Consul-based peer discovery plugin TTL
check").
%%
@@ -56,36 +54,33 @@
-spec list_nodes() -> {ok, {Nodes :: list(), NodeType ::
rabbit_types:node_type()}} | {error, Reason :: string()}.
list_nodes() ->
- case application:get_env(rabbit, cluster_formation) of
- undefined ->
- {ok, {[], disc}};
- {ok, ClusterFormation} ->
- case proplists:get_value(?BACKEND_CONFIG_KEY, ClusterFormation) of
- undefined ->
- rabbit_log:warning("Peer discovery backend is set to ~s "
- "but final config does not contain
rabbit.cluster_formation.peer_discovery_consul. "
- "Cannot discover any nodes because Consul
cluster details are not configured!",
- [?MODULE]),
- {ok, {[], disc}};
- Proplist ->
- M = maps:from_list(Proplist),
- case
rabbit_peer_discovery_httpc:get(get_config_key(consul_scheme, M),
- get_config_key(consul_host,
M),
- get_config_key(consul_port,
M),
- [v1, health, service,
get_config_key(consul_svc, M)],
- list_nodes_query_args(),
- maybe_add_acl([]),
- []) of
- {ok, Nodes} ->
- IncludeWithWarnings =
get_config_key(consul_include_nodes_with_warnings, M),
- Result = extract_nodes(
- filter_nodes(Nodes, IncludeWithWarnings)),
- {ok, {Result, disc}};
- {error, _} = Error ->
- Error
- end
- end
- end.
+ Fun0 = fun() -> {ok, {[], disc}} end,
+ Fun1 = fun() ->
+ rabbit_log:warning("Peer discovery backend is set to ~s "
+ "but final config does not contain
rabbit.cluster_formation.peer_discovery_consul. "
+ "Cannot discover any nodes because
Consul cluster details are not configured!",
+ [?MODULE]),
+ {ok, {[], disc}}
+ end,
+ Fun2 = fun(Proplist) ->
+ M = maps:from_list(Proplist),
+ case
rabbit_peer_discovery_httpc:get(get_config_key(consul_scheme, M),
+
get_config_key(consul_host, M),
+
get_config_key(consul_port, M),
+ [v1, health, service,
get_config_key(consul_svc, M)],
+
list_nodes_query_args(),
+ maybe_add_acl([]),
+ []) of
+ {ok, Nodes} ->
+ IncludeWithWarnings =
get_config_key(consul_include_nodes_with_warnings, M),
+ Result = extract_nodes(
+ filter_nodes(Nodes,
IncludeWithWarnings)),
+ {ok, {Result, disc}};
+ {error, _} = Error ->
+ Error
+ end
+ end,
+ rabbit_peer_discovery_util:maybe_backend_configured(?BACKEND_CONFIG_KEY,
Fun0, Fun1, Fun2).
-spec supports_registration() -> boolean().
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_consul/src/rabbitmq_peer_discovery_consul_sup.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_consul/src/rabbitmq_peer_discovery_consul_sup.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_consul/src/rabbitmq_peer_discovery_consul_sup.erl
2019-11-27 05:48:38.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_consul/src/rabbitmq_peer_discovery_consul_sup.erl
2019-12-03 15:55:04.000000000 +0100
@@ -20,23 +20,27 @@
-export([init/1, start_link/0]).
-include_lib("rabbit_common/include/rabbit.hrl").
+-include("rabbit_peer_discovery_consul.hrl").
%%
%% API
%%
init([]) ->
- Flags = #{strategy => one_for_one,
- intensity => 1,
- period => 1},
- Specs = [#{id => rabbitmq_peer_discovery_consul_health_check_helper,
- start =>
{rabbitmq_peer_discovery_consul_health_check_helper, start_link, []},
- restart => permanent,
- shutdown => ?SUPERVISOR_WAIT,
- type => worker,
- modules => [rabbitmq_peer_discovery_consul_health_check_helper]
- }],
- {ok, {Flags, Specs}}.
+ Flags = #{strategy => one_for_one, intensity => 1, period => 1},
+ Fun0 = fun() -> {ok, {Flags, []}} end,
+ Fun1 = fun() -> {ok, {Flags, []}} end,
+ Fun2 = fun(_) ->
+ Specs = [#{id =>
rabbitmq_peer_discovery_consul_health_check_helper,
+ start =>
{rabbitmq_peer_discovery_consul_health_check_helper, start_link, []},
+ restart => permanent,
+ shutdown => ?SUPERVISOR_WAIT,
+ type => worker,
+ modules =>
[rabbitmq_peer_discovery_consul_health_check_helper]
+ }],
+ {ok, {Flags, Specs}}
+ end,
+ rabbit_peer_discovery_util:maybe_backend_configured(?BACKEND_CONFIG_KEY,
Fun0, Fun1, Fun2).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_etcd/src/rabbit_peer_discovery_etcd.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_etcd/src/rabbit_peer_discovery_etcd.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_etcd/src/rabbit_peer_discovery_etcd.erl
2019-11-27 05:48:41.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_etcd/src/rabbit_peer_discovery_etcd.erl
2019-12-03 16:28:21.000000000 +0100
@@ -51,29 +51,28 @@
-spec list_nodes() -> {ok, {Nodes :: list(), NodeType ::
rabbit_types:node_type()}} | {error, Reason :: string()}.
list_nodes() ->
- case application:get_env(rabbit, cluster_formation) of
- undefined ->
- {ok, {[], disc}};
- {ok, ClusterFormation} ->
- case proplists:get_value(?BACKEND_CONFIG_KEY, ClusterFormation) of
- undefined ->
- rabbit_log:warning("Peer discovery backend is set to ~s "
- "but final config does not contain
rabbit.cluster_formation.peer_discovery_etcd. "
- "Cannot discover any nodes because etcd
cluster details are not configured!",
- [?MODULE]),
- {ok, {[], disc}};
- Proplist ->
- M = maps:from_list(Proplist),
- case etcd_get(nodes_path(M), [{recursive, true}], M) of
- {ok, Nodes} ->
- NodeList = extract_nodes(Nodes),
- {ok, NodeList};
- {error, "404"} ->
- {ok, []};
- Error -> Error
- end
- end
- end.
+ Fun0 = fun() -> {ok, {[], disc}} end,
+ Fun1 = fun() ->
+ rabbit_log:warning("Peer discovery backend is set to ~s "
+ "but final config does not contain "
+
"rabbit.cluster_formation.peer_discovery_etcd. "
+ "Cannot discover any nodes because etcd
cluster details are not configured!",
+ [?MODULE]),
+ {ok, {[], disc}}
+ end,
+ Fun2 = fun(Proplist) ->
+ M = maps:from_list(Proplist),
+ case etcd_get(nodes_path(M), [{recursive, true}], M) of
+ {ok, Nodes} ->
+ NodeList = extract_nodes(Nodes),
+ {ok, NodeList};
+ {error, "404"} ->
+ {ok, []};
+ Error ->
+ Error
+ end
+ end,
+ rabbit_peer_discovery_util:maybe_backend_configured(?BACKEND_CONFIG_KEY,
Fun0, Fun1, Fun2).
-spec supports_registration() -> boolean().
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_etcd/src/rabbitmq_peer_discovery_etcd_sup.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_etcd/src/rabbitmq_peer_discovery_etcd_sup.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_peer_discovery_etcd/src/rabbitmq_peer_discovery_etcd_sup.erl
2019-11-27 05:48:41.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_peer_discovery_etcd/src/rabbitmq_peer_discovery_etcd_sup.erl
2019-12-03 16:28:21.000000000 +0100
@@ -20,23 +20,27 @@
-export([init/1, start_link/0]).
-include_lib("rabbit_common/include/rabbit.hrl").
+-include("rabbit_peer_discovery_etcd.hrl").
%%
%% API
%%
init([]) ->
- Flags = #{strategy => one_for_one,
- intensity => 1,
- period => 1},
- Specs = [#{id => rabbitmq_peer_discovery_etcd_health_check_helper,
- start => {rabbitmq_peer_discovery_etcd_health_check_helper,
start_link, []},
- restart => permanent,
- shutdown => ?SUPERVISOR_WAIT,
- type => worker,
- modules => [rabbitmq_peer_discovery_etcd_health_check_helper]
- }],
- {ok, {Flags, Specs}}.
+ Flags = #{strategy => one_for_one, intensity => 1, period => 1},
+ Fun0 = fun() -> {ok, {Flags, []}} end,
+ Fun1 = fun() -> {ok, {Flags, []}} end,
+ Fun2 = fun(_) ->
+ Specs = [#{id =>
rabbitmq_peer_discovery_etcd_health_check_helper,
+ start =>
{rabbitmq_peer_discovery_etcd_health_check_helper, start_link, []},
+ restart => permanent,
+ shutdown => ?SUPERVISOR_WAIT,
+ type => worker,
+ modules =>
[rabbitmq_peer_discovery_etcd_health_check_helper]
+ }],
+ {ok, {Flags, Specs}}
+ end,
+ rabbit_peer_discovery_util:maybe_backend_configured(?BACKEND_CONFIG_KEY,
Fun0, Fun1, Fun2).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_stomp/src/rabbit_stomp_processor.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_stomp/src/rabbit_stomp_processor.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_stomp/src/rabbit_stomp_processor.erl
2019-11-27 05:47:37.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_stomp/src/rabbit_stomp_processor.erl
2019-12-02 06:29:21.000000000 +0100
@@ -851,7 +851,10 @@
close_connection(State = #proc_state{connection = Connection}) ->
%% ignore noproc or other exceptions to avoid debris
catch amqp_connection:close(Connection),
- State#proc_state{channel = none, connection = none, subscriptions = none}.
+ State#proc_state{channel = none, connection = none, subscriptions = none};
+close_connection(undefined) ->
+ rabbit_log:debug("~s:close_connection: undefined state", [?MODULE]),
+ #proc_state{channel = none, connection = none, subscriptions = none}.
%%----------------------------------------------------------------------------
%% Reply-To
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_stomp/src/rabbit_stomp_reader.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_stomp/src/rabbit_stomp_reader.erl
--- old/rabbitmq-server-3.7.22/deps/rabbitmq_stomp/src/rabbit_stomp_reader.erl
2019-11-27 05:47:37.000000000 +0100
+++ new/rabbitmq-server-3.7.23/deps/rabbitmq_stomp/src/rabbit_stomp_reader.erl
2019-12-02 06:29:21.000000000 +0100
@@ -23,6 +23,7 @@
code_change/3, terminate/2]).
-export([start_heartbeats/2]).
-export([info/2]).
+-export([ssl_login_name/2]).
-include("rabbit_stomp.hrl").
-include("rabbit_stomp_frame.hrl").
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/rabbitmq-server-3.7.22/deps/rabbitmq_web_stomp/src/rabbit_web_stomp_handler.erl
new/rabbitmq-server-3.7.23/deps/rabbitmq_web_stomp/src/rabbit_web_stomp_handler.erl
---
old/rabbitmq-server-3.7.22/deps/rabbitmq_web_stomp/src/rabbit_web_stomp_handler.erl
2019-11-27 05:48:17.000000000 +0100
+++
new/rabbitmq-server-3.7.23/deps/rabbitmq_web_stomp/src/rabbit_web_stomp_handler.erl
2019-12-02 06:41:21.000000000 +0100
@@ -90,11 +90,12 @@
ok
end,
+ SSLLogin = application:get_env(rabbitmq_stomp, ssl_cert_login, false),
+ StompConfig0 = #stomp_configuration{ssl_cert_login = SSLLogin,
implicit_connect = false},
UseHTTPAuth = application:get_env(rabbitmq_web_stomp, use_http_auth,
false),
- StompConfig0 = #stomp_configuration{implicit_connect = false},
UserConfig = application:get_env(rabbitmq_stomp, default_user, undefined),
StompConfig1 = rabbit_stomp:parse_default_user(UserConfig, StompConfig0),
- StompConfig = case UseHTTPAuth of
+ StompConfig2 = case UseHTTPAuth of
true ->
case AuthHd of
undefined ->
@@ -114,13 +115,15 @@
AdapterInfo0 = #amqp_adapter_info{additional_info=Extra}
= amqp_connection:socket_adapter_info(Sock, {'Web STOMP', 0}),
- %% Flow control is not supported for Web-STOMP connections.
+ %% Flow control is not supported for Web STOMP connections.
AdapterInfo = AdapterInfo0#amqp_adapter_info{
additional_info=[{state, running}|Extra]},
+ RealSocket = rabbit_net:unwrap_socket(Sock),
+ LoginNameFromCertificate = rabbit_stomp_reader:ssl_login_name(RealSocket,
StompConfig2),
ProcessorState = rabbit_stomp_processor:initial_state(
- StompConfig,
- {SendFun, AdapterInfo, none, PeerAddr}),
+ StompConfig2,
+ {SendFun, AdapterInfo, LoginNameFromCertificate, PeerAddr}),
{ok, ProcessorState}.
websocket_handle({text, Data}, State) ->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/rabbitmq-server-3.7.22/git-revisions.txt
new/rabbitmq-server-3.7.23/git-revisions.txt
--- old/rabbitmq-server-3.7.22/git-revisions.txt 2019-11-27
06:30:29.000000000 +0100
+++ new/rabbitmq-server-3.7.23/git-revisions.txt 2019-12-05
06:22:05.000000000 +0100
@@ -1,8 +1,8 @@
-RabbitMQ Server 3.7.22
-rabbitmq_server_release 49f2828cd752dae3f623b31331692fc1ff095a6e v3.7.22-rc.2
+RabbitMQ Server 3.7.23
+rabbitmq_server_release 4bc8413240a0e067ccbf35bea44abcd89927610b
amqp10_client 9b34f676642d08883fcc3fe38a9f65fe37ca0bc7 v3.7.22
-amqp10_common 2603f6dd5d38e53928e94260fee76a2c0c2415aa v3.7.22-rc.2
-amqp_client 47d244d8948c220e32027aadd2a94f831969ba83 v3.7.22
+amqp10_common 2603f6dd5d38e53928e94260fee76a2c0c2415aa v3.7.22
+amqp_client 9009f4202c3dcb7ab24d9faa9d7bda3fd1a3b7a4
cowboy
cowlib 8588724cf91ddbb53b9c35ed665866556b217323 2.7.0
credentials_obfuscation
@@ -11,43 +11,43 @@
jsx
lager
observer_cli
-rabbit f03f5aa9a308edea679396ecf23fd34f7780486b v3.7.22
-rabbit_common b622f65ed97a3bd3563d4912f39b4a18c06fe264 v3.7.22-rc.2
-rabbitmq_amqp1_0 efebe416a5bdcbef29a9102f5a95e4d094b67474 v3.7.22-rc.2
+rabbit 440da699a552879ee2ddb8646ce0ba23644e637c
+rabbit_common b622f65ed97a3bd3563d4912f39b4a18c06fe264 v3.7.22
+rabbitmq_amqp1_0 efebe416a5bdcbef29a9102f5a95e4d094b67474 v3.7.22
rabbitmq_auth_backend_cache 745233e297dd8110660fae55322a7878b489151a v3.7.22
rabbitmq_auth_backend_http c130398b7d2abf45be897d67499263d3beddbb1a v3.7.22
-rabbitmq_auth_backend_ldap 3d30722193b8789ae81e7e8f44bb138bf460ac9b
v3.7.22-rc.2
+rabbitmq_auth_backend_ldap 3d30722193b8789ae81e7e8f44bb138bf460ac9b v3.7.22
rabbitmq_auth_mechanism_ssl decabd86963e535dc3f326c408e5279167ee553b v3.7.22
-rabbitmq_aws e64adca1d513ea3d86aafb68a6c9ba0047da1985 v3.7.22-rc.2
-rabbitmq_cli d13be753a799a7f9e0d8123638276fdbda4adddb v3.7.22-rc.2
-rabbitmq_codegen b808d4231384eeaa11af0e8f26436ee5b6f96bec v3.7.22-rc.2
+rabbitmq_aws e64adca1d513ea3d86aafb68a6c9ba0047da1985 v3.7.22
+rabbitmq_cli 5bae5b3437e38dee4a01199b9cd7e4b75c517c0b
+rabbitmq_codegen b808d4231384eeaa11af0e8f26436ee5b6f96bec v3.7.22
rabbitmq_consistent_hash_exchange 5ff7f6718413bcc6427c92c4b3ab5bea1360acf3
v3.7.22
-rabbitmq_event_exchange bde8836294b398c053f46791537700be874ac834 v3.7.22-rc.2
-rabbitmq_federation e6f0e2c6b62dca303ec4f870bbd1ae1216c74651 v3.7.22-rc.2
-rabbitmq_federation_management 7dfd6f98688e54cfbdc0370537df705cfb65177e
v3.7.22-rc.2
-rabbitmq_jms_topic_exchange 70f89eda4650daf9e366f15b2bed05051d91d23c
v3.7.22-rc.2
-rabbitmq_management 4e346ecf7e78ef6f60942d516eb088a668af23e3 v3.7.22
-rabbitmq_management_agent 1316a6fd13aaaced538f7e681aebd7e001fef344 v3.7.22-rc.2
-rabbitmq_mqtt d602b74ac6bc6babe6368dd2770a642825f6729e v3.7.22-rc.2
-rabbitmq_peer_discovery_aws 45c208a21f734db2ecc5cc253060e7ed03b0e63c
v3.7.22-rc.2
-rabbitmq_peer_discovery_common 9a5913c2577d2693b99d7a84b67ae08aaf3cd511
v3.7.22-rc.2
-rabbitmq_peer_discovery_consul b0fd6a01b288cb29abfc3263d6836ff7f34fd45e
v3.7.22-rc.2
-rabbitmq_peer_discovery_etcd cdb9ccc888a4a25cb2e4265e6b55214f01a828cc
v3.7.22-rc.2
+rabbitmq_event_exchange bde8836294b398c053f46791537700be874ac834 v3.7.22
+rabbitmq_federation e6f0e2c6b62dca303ec4f870bbd1ae1216c74651 v3.7.22
+rabbitmq_federation_management 7dfd6f98688e54cfbdc0370537df705cfb65177e v3.7.22
+rabbitmq_jms_topic_exchange 70f89eda4650daf9e366f15b2bed05051d91d23c v3.7.22
+rabbitmq_management 72c9d0a4d437401077f300bef14a5d8229fe6fdb
+rabbitmq_management_agent 1316a6fd13aaaced538f7e681aebd7e001fef344 v3.7.22
+rabbitmq_mqtt d602b74ac6bc6babe6368dd2770a642825f6729e v3.7.22
+rabbitmq_peer_discovery_aws 45c208a21f734db2ecc5cc253060e7ed03b0e63c v3.7.22
+rabbitmq_peer_discovery_common 3512288941d1c6908a73a0792c6a34e6488a3d02
+rabbitmq_peer_discovery_consul 1d3e75aa91b2c24a7b59fde72137c72958e9a75f
+rabbitmq_peer_discovery_etcd f3212a020d68f098229dfbb252a0bd136edb55bd
rabbitmq_peer_discovery_k8s 2da5a78716361c0d37a09fc7b6b1f11c4f0ee5ef v3.7.22
rabbitmq_random_exchange 62ac0effd3e64518758e52aadcf2a7d49cec2ce3 v3.7.22
-rabbitmq_recent_history_exchange ad2e479cf76fbb3c8a125bd4b39e6e85b5f01157
v3.7.22-rc.2
+rabbitmq_recent_history_exchange ad2e479cf76fbb3c8a125bd4b39e6e85b5f01157
v3.7.22
rabbitmq_sharding ed15e34adce9cfa330481c1450ed0eb857420bb5 v3.7.22
rabbitmq_shovel 858ca0e51f21e494af11f9d496bdceedff43af9d v3.7.22
-rabbitmq_shovel_management 4ed231a13054f9bab228462c82dfa977429436c8
v3.7.22-rc.2
-rabbitmq_stomp 5e65c85ad2d33a054bb8dac8ed38d4a9b1e8fd64 v3.7.22-rc.2
+rabbitmq_shovel_management 4ed231a13054f9bab228462c82dfa977429436c8 v3.7.22
+rabbitmq_stomp f97a01c635aeb954fdcfc9a657bf9cda6a3e7b63
rabbitmq_top 7dfe45fee14628f1b5bb9f424c28500981fe140e v3.7.22
-rabbitmq_tracing e5772822957c2c636b63ba484afdfd8d64063335 v3.7.22-rc.2
-rabbitmq_trust_store ab8138c3a38d6c5bbc0ca862b01995c0f70198a1 v3.7.22-rc.2
-rabbitmq_web_dispatch 13743f4fa010bec3cff448e0d4eff48ed1329604 v3.7.22-rc.2
-rabbitmq_web_mqtt ff4d11e38406b1813e5c3bea4d07bf33d9fff5a8 v3.7.22-rc.2
-rabbitmq_web_mqtt_examples dce1cb830ab85a93515781e596ff29d268fa16d0
v3.7.22-rc.2
-rabbitmq_web_stomp ed5baab673e5c087801b6496defae447e9839c14 v3.7.22-rc.2
-rabbitmq_web_stomp_examples 8e1dc308359e20ea34882d1b664d8529849fed6d
v3.7.22-rc.2
+rabbitmq_tracing e5772822957c2c636b63ba484afdfd8d64063335 v3.7.22
+rabbitmq_trust_store ab8138c3a38d6c5bbc0ca862b01995c0f70198a1 v3.7.22
+rabbitmq_web_dispatch 13743f4fa010bec3cff448e0d4eff48ed1329604 v3.7.22
+rabbitmq_web_mqtt ff4d11e38406b1813e5c3bea4d07bf33d9fff5a8 v3.7.22
+rabbitmq_web_mqtt_examples dce1cb830ab85a93515781e596ff29d268fa16d0 v3.7.22
+rabbitmq_web_stomp 5b9eec7840d865f0ef446c3ec52830293d95bda1
+rabbitmq_web_stomp_examples 8e1dc308359e20ea34882d1b664d8529849fed6d v3.7.22
ranch
recon
stdout_formatter