Skip to content

Commit f82fd40

Browse files
authored
Merge pull request #12800 from rabbitmq/mergify/bp/v4.0.x/pr-12799
rabbit_vhosts: Don't reconcile vhosts if `rabbit` is stopped (backport #12799)
2 parents 5da87b3 + acbc895 commit f82fd40

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

deps/rabbit/src/rabbit_vhosts.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ boot() ->
5151
%% See start_processes_for_all/1.
5252
-spec reconcile() -> 'ok'.
5353
reconcile() ->
54-
case is_reconciliation_enabled() of
54+
case rabbit:is_running() andalso is_reconciliation_enabled() of
5555
false -> ok;
5656
true ->
5757
_ = reconcile_once(),

deps/rabbit/test/quorum_queue_member_reconciliation_SUITE.erl

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ reset_nodes([], _Leader) ->
9292
ok;
9393
reset_nodes([Node| Nodes], Leader) ->
9494
ok = rabbit_control_helper:command(stop_app, Node),
95-
ok = rabbit_control_helper:command(forget_cluster_node, Leader, [atom_to_list(Node)]),
95+
case rabbit_control_helper:command(forget_cluster_node, Leader, [atom_to_list(Node)]) of
96+
ok -> ok;
97+
{error, _, <<"Error:\n{:not_a_cluster_node, ~c\"The node selected is not in the cluster.\"}">>} -> ok
98+
end,
9699
ok = rabbit_control_helper:command(reset, Node),
97100
ok = rabbit_control_helper:command(start_app, Node),
98101
reset_nodes(Nodes, Leader).

0 commit comments

Comments
 (0)