From 7acefff879e99ba1391ce25f54f8c4797671f0bd Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Aug 23 2016 15:19:43 +0000 Subject: Ver. 3.6.5 Signed-off-by: Peter Lemenkov --- diff --git a/.gitignore b/.gitignore index fb3737f..e039fbc 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ rabbitmq-server-1.8.0.tar.gz /rabbitmq-server-3.6.1.tar.xz /rabbitmq-server-3.6.2.tar.xz /rabbitmq-server-3.6.3.tar.xz +/rabbitmq-server-3.6.5.tar.xz diff --git a/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch b/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch index 48f7365..756e670 100644 --- a/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch +++ b/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch @@ -15,15 +15,15 @@ Subject: [PATCH] Avoid RPC roundtrips while listing items Part of https://github.com/rabbitmq/rabbitmq-server/pull/683 diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl -index 6d4e52e..60e94c0 100644 +index 27b352a..38300bd 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -25,10 +25,10 @@ check_exclusive_access/2, with_exclusive_access_or_die/3, stat/1, deliver/2, requeue/3, ack/3, reject/4]). -export([list/0, list/1, info_keys/0, info/1, info/2, info_all/1, info_all/2, -- info_all/6]). -+ emit_info_all/5, list_local/1]). +- info_all/6, info_local/1]). ++ emit_info_all/5, list_local/1, info_local/1]). -export([list_down/1]). -export([force_event_refresh/1, notify_policy_changed/1]). --export([consumers/1, consumers_all/1, consumers_all/3, consumer_info_keys/0]). @@ -92,9 +92,9 @@ index 6d4e52e..60e94c0 100644 + State =/= crashed, + node() =:= node(QPid) ]. - force_event_refresh(Ref) -> - [gen_server2:cast(Q#amqqueue.pid, -@@ -656,12 +659,17 @@ consumers_all(VHostPath) -> + info_local(VHostPath) -> + map(list_local(VHostPath), fun (Q) -> info(Q, [name]) end). +@@ -664,12 +667,17 @@ consumers_all(VHostPath) -> map(list(VHostPath), fun(Q) -> get_queue_consumer_info(Q, ConsumerInfoKeys) end)). @@ -115,15 +115,15 @@ index 6d4e52e..60e94c0 100644 get_queue_consumer_info(Q, ConsumerInfoKeys) -> [lists:zip(ConsumerInfoKeys, diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl -index 53b9fe8..e115b76 100644 +index ab7d38d..837a892 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -56,7 +56,7 @@ -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, -- info_all/3]). -+ emit_info_all/4]). +- info_all/3, info_local/1]). ++ emit_info_all/4, info_local/1]). -export([refresh_config_local/0, ready_for_close/1]). -export([force_event_refresh/1]). @@ -144,9 +144,9 @@ index 53b9fe8..e115b76 100644 -spec refresh_config_local() -> 'ok'. -spec ready_for_close(pid()) -> 'ok'. -spec force_event_refresh(reference()) -> 'ok'. -@@ -326,9 +325,16 @@ info_all() -> - info_all(Items) -> - rabbit_misc:filter_exit_map(fun (C) -> info(C, Items) end, list()). +@@ -329,9 +328,16 @@ info_all(Items) -> + info_local(Items) -> + rabbit_misc:filter_exit_map(fun (C) -> info(C, Items) end, list_local()). -info_all(Items, Ref, AggregatorPid) -> +emit_info_all(Nodes, Items, Ref, AggregatorPid) -> @@ -164,7 +164,7 @@ index 53b9fe8..e115b76 100644 refresh_config_local() -> rabbit_misc:upmap( diff --git a/src/rabbit_control_misc.erl b/src/rabbit_control_misc.erl -index 0d2de1f..2e7a16c 100644 +index 2e1f6cc..3b0c60b 100644 --- a/src/rabbit_control_misc.erl +++ b/src/rabbit_control_misc.erl @@ -17,7 +17,8 @@ @@ -319,7 +319,7 @@ index 0d2de1f..2e7a16c 100644 timer:send_after(Timeout, Pid, {Ref, {timeout, Timeout}}). diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl -index 9750ba8..02ffeb7 100644 +index 8965c59..9341ea9 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -75,7 +75,7 @@ @@ -329,18 +329,18 @@ index 9750ba8..02ffeb7 100644 --export([rpc_call/4, rpc_call/5, rpc_call/7]). +-export([rpc_call/4, rpc_call/5]). -export([report_default_thread_pool_size/0]). + -export([get_gc_info/1]). - %% Horrible macro to use in guards -@@ -262,8 +262,6 @@ +@@ -264,8 +264,6 @@ -spec random(non_neg_integer()) -> non_neg_integer(). -spec rpc_call(node(), atom(), atom(), [any()]) -> any(). -spec rpc_call(node(), atom(), atom(), [any()], number()) -> any(). --spec rpc_call - (node(), atom(), atom(), [any()], reference(), pid(), number()) -> any(). -spec report_default_thread_pool_size() -> 'ok'. + -spec get_gc_info(pid()) -> integer(). - %%---------------------------------------------------------------------------- -@@ -1173,9 +1171,6 @@ rpc_call(Node, Mod, Fun, Args, Timeout) -> +@@ -1184,9 +1182,6 @@ rpc_call(Node, Mod, Fun, Args, Timeout) -> rpc:call(Node, Mod, Fun, Args, Timeout) end. diff --git a/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch b/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch index 74be7fb..e98c427 100644 --- a/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch +++ b/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Revert "Distinct exit-codes for CLI utilities" This reverts commit 7984540175d0b8852025165b6b6a0ac05d692c98. diff --git a/include/rabbit_cli.hrl b/include/rabbit_cli.hrl -index 7f5db60..01cb91c 100644 +index a0d1ecf..efd328a 100644 --- a/include/rabbit_cli.hrl +++ b/include/rabbit_cli.hrl @@ -46,14 +46,3 @@ diff --git a/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch b/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch index 9ab4b98..6a3de92 100644 --- a/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch +++ b/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch @@ -18,7 +18,7 @@ info about only local items to aggregator, in an async fashion - as no reply from aggregator is needed. diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl -index fb3da21..1a98dcc 100644 +index ea9d6a2..d2dc880 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -23,7 +23,7 @@ @@ -30,7 +30,7 @@ index fb3da21..1a98dcc 100644 -define(EXTERNAL_CHECK_INTERVAL, 1000). -@@ -589,56 +589,74 @@ action(purge_queue, Node, [Q], Opts, Inform, Timeout) -> +@@ -595,56 +595,74 @@ action(purge_queue, Node, [Q], Opts, Inform, Timeout) -> action(list_users, Node, [], _Opts, Inform, Timeout) -> Inform("Listing users", []), @@ -123,7 +123,7 @@ index fb3da21..1a98dcc 100644 action(list_bindings, Node, Args, Opts, Inform, Timeout) -> Inform("Listing bindings", []), -@@ -646,27 +664,31 @@ action(list_bindings, Node, Args, Opts, Inform, Timeout) -> +@@ -652,27 +670,31 @@ action(list_bindings, Node, Args, Opts, Inform, Timeout) -> ArgAtoms = default_if_empty(Args, [source_name, source_kind, destination_name, destination_kind, routing_key, arguments]), @@ -155,15 +155,15 @@ index fb3da21..1a98dcc 100644 Inform("Listing consumers", []), VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), - call(Node, {rabbit_amqqueue, consumers_all, [VHostArg]}, -- rabbit_amqqueue:consumer_info_keys(), Timeout). +- rabbit_amqqueue:consumer_info_keys(), Timeout); + Nodes = nodes_in_cluster(Node, Timeout), + call_emitter(Node, {rabbit_amqqueue, emit_consumers_all, [Nodes, VHostArg]}, + rabbit_amqqueue:consumer_info_keys(), + [{timeout, Timeout}, {chunks, length(Nodes)}]). - format_parse_error({_Line, Mod, Err}) -> lists:flatten(Mod:format_error(Err)). - -@@ -772,17 +794,18 @@ display_info_message_row(IsEscaped, Result, InfoItemKeys) -> + action(node_health_check, Node, _Args, _Opts, Inform, Timeout) -> + Inform("Checking health of node ~p", [Node]), +@@ -788,17 +810,18 @@ display_info_message_row(IsEscaped, Result, InfoItemKeys) -> {X, Value} -> Value end, IsEscaped) || X <- InfoItemKeys]). @@ -186,7 +186,7 @@ index fb3da21..1a98dcc 100644 end. display_info_list(Results, InfoItemKeys) when is_list(Results) -> -@@ -839,7 +862,10 @@ display_call_result(Node, MFA) -> +@@ -855,7 +878,10 @@ display_call_result(Node, MFA) -> end. unsafe_rpc(Node, Mod, Fun, Args) -> @@ -198,7 +198,7 @@ index fb3da21..1a98dcc 100644 {badrpc, _} = Res -> throw(Res); Normal -> Normal end. -@@ -858,33 +884,42 @@ ensure_app_running(Node) -> +@@ -874,33 +900,42 @@ ensure_app_running(Node) -> call(Node, {Mod, Fun, Args}) -> rpc_call(Node, Mod, Fun, lists:map(fun list_to_binary_utf8/1, Args)). @@ -266,7 +266,7 @@ index fb3da21..1a98dcc 100644 list_to_binary_utf8(L) -> B = list_to_binary(L), -@@ -934,7 +969,10 @@ split_list([_]) -> exit(even_list_needed); +@@ -950,7 +985,10 @@ split_list([_]) -> exit(even_list_needed); split_list([A, B | T]) -> [{A, B} | split_list(T)]. nodes_in_cluster(Node) -> @@ -277,4 +277,4 @@ index fb3da21..1a98dcc 100644 + unsafe_rpc(Node, rabbit_mnesia, cluster_nodes, [running], Timeout). alarms_by_node(Name) -> - Status = unsafe_rpc(Name, rabbit, status, []), + case rpc_call(Name, rabbit, status, []) of diff --git a/rabbitmq-server-0007-Don-t-die-in-case-of-faulty-node.patch b/rabbitmq-server-0007-Don-t-die-in-case-of-faulty-node.patch deleted file mode 100644 index d38a9aa..0000000 --- a/rabbitmq-server-0007-Don-t-die-in-case-of-faulty-node.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Peter Lemenkov -Date: Fri, 22 Jul 2016 17:15:02 +0200 -Subject: [PATCH] Don't die in case of faulty node - -Signed-off-by: Peter Lemenkov - -diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl -index 1a98dcc..9621af8 100644 ---- a/src/rabbit_control_main.erl -+++ b/src/rabbit_control_main.erl -@@ -975,6 +975,9 @@ nodes_in_cluster(Node, Timeout) -> - unsafe_rpc(Node, rabbit_mnesia, cluster_nodes, [running], Timeout). - - alarms_by_node(Name) -> -- Status = unsafe_rpc(Name, rabbit, status, []), -- {_, As} = lists:keyfind(alarms, 1, Status), -- {Name, As}. -+ case rpc_call(Name, rabbit, status, []) of -+ {badrpc,nodedown} -> {Name, [nodedown]}; -+ Status -> -+ {_, As} = lists:keyfind(alarms, 1, Status), -+ {Name, As} -+ end. diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 016de13..3a7d940 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -4,8 +4,8 @@ Name: rabbitmq-server -Version: 3.6.3 -Release: 6%{?dist} +Version: 3.6.5 +Release: 1%{?dist} License: MPLv1.1 Group: Development/Libraries Source0: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.xz @@ -22,7 +22,6 @@ Patch3: rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch Patch4: rabbitmq-server-0004-Allow-guest-login-from-non-loopback-connections.patch Patch5: rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch Patch6: rabbitmq-server-0006-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch -Patch7: rabbitmq-server-0007-Don-t-die-in-case-of-faulty-node.patch Patch101: rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch Patch102: rabbitmq-common-0002-Use-proto_dist-from-command-line.patch @@ -64,7 +63,6 @@ scalable implementation of an AMQP broker. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 cd deps/rabbit_common %patch101 -p1 @@ -187,6 +185,9 @@ done %changelog +* Tue Aug 23 2016 Peter Lemenkov - 3.6.5-1 +- Ver. 3.6.5 + * Mon Jul 25 2016 John Eckersberg - 3.6.3-6 - Install rabbitmq-server-ha agent diff --git a/sources b/sources index d94c855..dcab44e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3568dceb7f120549fc0add9836b89659 rabbitmq-server-3.6.3.tar.xz +e9f96b5763a89a246f53250e46c2796b rabbitmq-server-3.6.5.tar.xz