Trigger CI
Peer Discovery AWS Integration Test / Integration Test (push) Waiting to run Details

This commit is contained in:
Michal Kuratczyk 2025-07-16 00:32:20 +02:00
parent 4f3f4b085d
commit 02df90c490
No known key found for this signature in database
92 changed files with 582 additions and 611 deletions

View File

@ -358,8 +358,7 @@ run_prelaunch_second_phase() ->
case IsInitialPass of case IsInitialPass of
true -> true ->
?LOG_DEBUG(""), ?LOG_DEBUG(""),
?LOG_DEBUG( ?LOG_DEBUG("== Prelaunch phase [2/2] (initial pass) ==");
"== Prelaunch phase [2/2] (initial pass) ==");
false -> false ->
?LOG_DEBUG(""), ?LOG_DEBUG(""),
?LOG_DEBUG("== Prelaunch phase [2/2] =="), ?LOG_DEBUG("== Prelaunch phase [2/2] =="),
@ -522,8 +521,7 @@ stop_and_halt() ->
try try
stop() stop()
catch Type:Reason -> catch Type:Reason ->
?LOG_ERROR( ?LOG_ERROR("Error trying to stop ~ts: ~tp:~tp",
"Error trying to stop ~ts: ~tp:~tp",
[product_name(), Type, Reason], [product_name(), Type, Reason],
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}), #{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
error({Type, Reason}) error({Type, Reason})
@ -896,8 +894,7 @@ environment(App) ->
-spec rotate_logs() -> rabbit_types:ok_or_error(any()). -spec rotate_logs() -> rabbit_types:ok_or_error(any()).
rotate_logs() -> rotate_logs() ->
?LOG_ERROR( ?LOG_ERROR("Forcing log rotation is currently unsupported",
"Forcing log rotation is currently unsupported",
#{domain => ?RMQLOG_DOMAIN_GLOBAL}), #{domain => ?RMQLOG_DOMAIN_GLOBAL}),
{error, unsupported}. {error, unsupported}.

View File

@ -1895,7 +1895,8 @@ internal_delete(Queue, ActingUser, Reason) ->
%% TODO this is used by `rabbit_mnesia:remove_node_if_mnesia_running` %% TODO this is used by `rabbit_mnesia:remove_node_if_mnesia_running`
%% Does it make any sense once mnesia is not used/removed? %% Does it make any sense once mnesia is not used/removed?
forget_all_durable(Node) -> forget_all_durable(Node) ->
?LOG_INFO("Will remove all classic queues from node ~ts. The node is likely being removed from the cluster.", [Node]), ?LOG_INFO("Will remove all classic queues from node ~ts. The node is likely being removed from the cluster.",
[Node]),
UpdateFun = fun(Q) -> UpdateFun = fun(Q) ->
forget_node_for_queue(Q) forget_node_for_queue(Q)
end, end,

View File

@ -55,11 +55,9 @@ ensure1(FileJustChanged0) ->
{[], []} -> {[], []} ->
ok; ok;
{[], _} -> {[], _} ->
?LOG_INFO("Plugins changed; disabled ~tp", ?LOG_INFO("Plugins changed; disabled ~tp", [Stop]);
[Stop]);
{_, []} -> {_, []} ->
?LOG_INFO("Plugins changed; enabled ~tp", ?LOG_INFO("Plugins changed; enabled ~tp", [Start]);
[Start]);
{_, _} -> {_, _} ->
?LOG_INFO("Plugins changed; enabled ~tp, disabled ~tp", ?LOG_INFO("Plugins changed; enabled ~tp, disabled ~tp",
[Start, Stop]) [Start, Stop])

View File

@ -359,12 +359,10 @@ log_reason({network_error,
{tls_alert, Alert}}, ConnName}, _State) -> {tls_alert, Alert}}, ConnName}, _State) ->
log_tls_alert(Alert, ConnName); log_tls_alert(Alert, ConnName);
log_reason({network_error, {ssl_upgrade_error, Reason}, ConnName}, _State) -> log_reason({network_error, {ssl_upgrade_error, Reason}, ConnName}, _State) ->
?LOG_ERROR("STOMP detected TLS upgrade error on ~ts: ~tp", ?LOG_ERROR("STOMP detected TLS upgrade error on ~ts: ~tp", [ConnName, Reason]);
[ConnName, Reason]);
log_reason({network_error, Reason, ConnName}, _State) -> log_reason({network_error, Reason, ConnName}, _State) ->
?LOG_ERROR("STOMP detected network error on ~ts: ~tp", ?LOG_ERROR("STOMP detected network error on ~ts: ~tp", [ConnName, Reason]);
[ConnName, Reason]);
log_reason({network_error, Reason}, _State) -> log_reason({network_error, Reason}, _State) ->
?LOG_ERROR("STOMP detected network error: ~tp", [Reason]); ?LOG_ERROR("STOMP detected network error: ~tp", [Reason]);

View File

@ -441,12 +441,10 @@ handle_info(Msg,
#stream_connection{connection_step = NewConnectionStep} = #stream_connection{connection_step = NewConnectionStep} =
Connection1, Connection1,
?LOG_DEBUG("Transitioned from ~ts to ~ts", ?LOG_DEBUG("Transitioned from ~ts to ~ts",
[PreviousConnectionStep, [PreviousConnectionStep, NewConnectionStep]),
NewConnectionStep]),
Transition(NewConnectionStep, StatemData, Connection1, State1); Transition(NewConnectionStep, StatemData, Connection1, State1);
{Closed, S} -> {Closed, S} ->
?LOG_DEBUG("Stream protocol connection socket ~w closed", ?LOG_DEBUG("Stream protocol connection socket ~w closed", [S]),
[S]),
stop; stop;
{Error, S, Reason} -> {Error, S, Reason} ->
?LOG_WARNING("Socket error ~tp [~w]", [Reason, S]), ?LOG_WARNING("Socket error ~tp [~w]", [Reason, S]),
@ -494,8 +492,7 @@ transition_to_opened(Transport,
invalid_transition(Transport, Socket, From, To) -> invalid_transition(Transport, Socket, From, To) ->
?LOG_WARNING("Closing socket ~w. Invalid transition from ~ts " ?LOG_WARNING("Closing socket ~w. Invalid transition from ~ts "
"to ~ts.", "to ~ts.", [Socket, From, To]),
[Socket, From, To]),
close_immediately(Transport, Socket), close_immediately(Transport, Socket),
stop. stop.
@ -639,8 +636,7 @@ open(info, {resource_alarm, IsThereAlarm},
CreditsRequiredForUnblocking}} = CreditsRequiredForUnblocking}} =
StatemData) -> StatemData) ->
?LOG_DEBUG("Connection ~tp received resource alarm. Alarm " ?LOG_DEBUG("Connection ~tp received resource alarm. Alarm "
"on? ~tp", "on? ~tp", [ConnectionName, IsThereAlarm]),
[ConnectionName, IsThereAlarm]),
EnoughCreditsToUnblock = EnoughCreditsToUnblock =
has_enough_credits_to_unblock(Credits, CreditsRequiredForUnblocking), has_enough_credits_to_unblock(Credits, CreditsRequiredForUnblocking),
NewBlockedState = NewBlockedState =
@ -1106,9 +1102,7 @@ open(cast,
SendFileOct) SendFileOct)
of of
{error, closed} -> {error, closed} ->
?LOG_INFO("Stream protocol connection has been closed by " ?LOG_INFO("Stream protocol connection has been closed by peer", []),
"peer",
[]),
throw({stop, normal}); throw({stop, normal});
{error, Reason} -> {error, Reason} ->
?LOG_INFO("Error while sending chunks: ~tp", ?LOG_INFO("Error while sending chunks: ~tp",
@ -1986,10 +1980,7 @@ handle_frame_post_auth(Transport,
false -> false ->
?LOG_DEBUG("Creating subscription ~tp to ~tp, with offset " ?LOG_DEBUG("Creating subscription ~tp to ~tp, with offset "
"specification ~tp, properties ~0p", "specification ~tp, properties ~0p",
[SubscriptionId, [SubscriptionId, Stream, OffsetSpec, Properties]),
Stream,
OffsetSpec,
Properties]),
Sac = single_active_consumer(Properties), Sac = single_active_consumer(Properties),
ConsumerName = consumer_name(Properties), ConsumerName = consumer_name(Properties),
case {Sac, ConsumerName} case {Sac, ConsumerName}
@ -2058,9 +2049,7 @@ handle_frame_post_auth(Transport,
SendFileOct) SendFileOct)
of of
{error, closed} -> {error, closed} ->
?LOG_INFO("Stream protocol connection has been closed by " ?LOG_INFO("Stream protocol connection has been closed by peer", []),
"peer",
[]),
throw({stop, normal}); throw({stop, normal});
{ok, Consumer1} -> {ok, Consumer1} ->
{Connection, {Connection,
@ -2447,8 +2436,7 @@ handle_frame_post_auth(Transport,
?RESPONSE_CODE_OK -> ?RESPONSE_CODE_OK ->
ok; ok;
RC -> RC ->
?LOG_INFO("Unexpected consumer update response code: ~tp", ?LOG_INFO("Unexpected consumer update response code: ~tp", [RC])
[RC])
end, end,
case maps:take(CorrelationId, Requests0) of case maps:take(CorrelationId, Requests0) of
{#request{content = #{subscription_id := SubscriptionId} = Msg}, Rs} -> {#request{content = #{subscription_id := SubscriptionId} = Msg}, Rs} ->
@ -2504,10 +2492,7 @@ handle_frame_post_auth(Transport,
?LOG_DEBUG("Dispatching to subscription ~tp (stream ~tp), " ?LOG_DEBUG("Dispatching to subscription ~tp (stream ~tp), "
"credit(s) ~tp, send limit ~tp", "credit(s) ~tp, send limit ~tp",
[SubscriptionId, [SubscriptionId, Stream, Crdt, SndLmt]),
Stream,
Crdt,
SndLmt]),
ConsumedMessagesBefore = messages_consumed(ConsumerCounters), ConsumedMessagesBefore = messages_consumed(ConsumerCounters),
@ -2518,9 +2503,7 @@ handle_frame_post_auth(Transport,
SendFileOct) SendFileOct)
of of
{error, closed} -> {error, closed} ->
?LOG_INFO("Stream protocol connection has been closed by " ?LOG_INFO("Stream protocol connection has been closed by peer", []),
"peer",
[]),
throw({stop, normal}); throw({stop, normal});
{error, Reason} -> {error, Reason} ->
?LOG_INFO("Error while sending chunks: ~tp", ?LOG_INFO("Error while sending chunks: ~tp",
@ -2536,9 +2519,7 @@ handle_frame_post_auth(Transport,
ConsumedMessagesAfter = messages_consumed(ConsumerCounters), ConsumedMessagesAfter = messages_consumed(ConsumerCounters),
?LOG_DEBUG("Subscription ~tp (stream ~tp) is now at offset ~tp with ~tp " ?LOG_DEBUG("Subscription ~tp (stream ~tp) is now at offset ~tp with ~tp "
"message(s) distributed after subscription", "message(s) distributed after subscription",
[SubscriptionId, [SubscriptionId, Stream, ConsumerOffset,
Stream,
ConsumerOffset,
ConsumedMessagesAfter - ConsumedMessagesBefore]), ConsumedMessagesAfter - ConsumedMessagesBefore]),
Consumers#{SubscriptionId => Consumer2}; Consumers#{SubscriptionId => Consumer2};
@ -2852,9 +2833,7 @@ maybe_dispatch_on_subscription(Transport,
SendFileOct) SendFileOct)
of of
{error, closed} -> {error, closed} ->
?LOG_INFO("Stream protocol connection has been closed by " ?LOG_INFO("Stream protocol connection has been closed by peer", []),
"peer",
[]),
throw({stop, normal}); throw({stop, normal});
{ok, #consumer{log = Log1, credit = Credit1} = ConsumerState1} -> {ok, #consumer{log = Log1, credit = Credit1} = ConsumerState1} ->
Consumers1 = Consumers#{SubscriptionId => ConsumerState1}, Consumers1 = Consumers#{SubscriptionId => ConsumerState1},

View File

@ -345,4 +345,3 @@ clean_deleted_providers(Providers) ->
ets:fun2ms(fun(#entry{provider = P})-> true end), ets:fun2ms(fun(#entry{provider = P})-> true end),
Condition = [ {'=/=', '$1', Provider} || Provider <- Providers ], Condition = [ {'=/=', '$1', Provider} || Provider <- Providers ],
ets:select_delete(table_name(), [{EntryMatch, Condition, [true]}]). ets:select_delete(table_name(), [{EntryMatch, Condition, [true]}]).

View File

@ -39,8 +39,7 @@ list_certs(Config, _) ->
load_cert({FileName, _, _}, _, Config) -> load_cert({FileName, _, _}, _, Config) ->
Path = directory_path(Config), Path = directory_path(Config),
Cert = extract_cert(Path, FileName), Cert = extract_cert(Path, FileName),
?LOG_INFO( ?LOG_INFO("trust store: loading certificate '~ts'", [FileName]),
"trust store: loading certificate '~ts'", [FileName]),
{ok, Cert}. {ok, Cert}.
extract_cert(Path, FileName) -> extract_cert(Path, FileName) ->