Ignore drained nodes when rebalancing
When running `rabbitmq-queues rebalance`, drained nodes (nodes in maintenance mode) should not recive QQ leaders nor CMQ masters.
This commit is contained in:
parent
b5ed4e7ca1
commit
1c13bb00f1
|
|
@ -504,7 +504,7 @@ maybe_migrate(ByNode, MaxQueuesDesired, [N | Nodes]) ->
|
|||
[{_, Q, false} = Queue | Queues] = All when length(All) > MaxQueuesDesired ->
|
||||
Name = amqqueue:get_name(Q),
|
||||
Module = rebalance_module(Q),
|
||||
Candidates = Module:get_replicas(Q) -- [N],
|
||||
Candidates = rabbit_maintenance:filter_out_drained_nodes_consistent_read(Module:get_replicas(Q) -- [N]),
|
||||
case Candidates of
|
||||
[] ->
|
||||
{not_migrated, update_not_migrated_queue(N, Queue, Queues, ByNode)};
|
||||
|
|
|
|||
Loading…
Reference in New Issue