Commit Graph

99 Commits

Author SHA1 Message Date
Aaron Seo fa310864d7 Fix force_checkpoint tests and CLI command
(cherry picked from commit 12bf3e094e)

Conflicts:
	deps/rabbit/src/rabbit_quorum_queue.erl
2025-05-22 15:09:23 +02:00
Aaron Seo 0d3dfd9695 Add force checkpoint functions for quorum queues and command line tool
(cherry picked from commit b54ab1d5e5)
2025-05-22 14:58:12 +02:00
Mirah Gary 34ef4c4e6a
Fix error message to reflect command. 2025-03-04 10:57:28 +01:00
Michael Klishin 3f5b13d47f
Merge branch 'main' into mk-virtual-host-protection-from-accidental-deletion 2025-01-02 17:01:54 -05:00
Michael Klishin c95a95f822
CLI: mix format 2025-01-02 17:00:46 -05:00
Michael Klishin 968eefa1bb
Bump (c) line year
There are no functional changes to this massive diff.
2025-01-01 17:54:10 -05:00
Michael Klishin 5346339655 Squash two more deprecated CMQ-related CLI command warnings 2024-07-15 12:38:01 -04:00
Michael Klishin 8de26fbc03 Fix two warnings in a deprecated CMQ-related CLI command 2024-07-15 12:38:01 -04:00
Michal Kuratczyk e1b649c0c6 check_if_node_is_mirror_sync_critical is no-op
Make `check_if_node_is_mirror_sync_critical` a no-op
with a deprecation warning. Since this command is commonly used
as part of the node shutdown process (eg. by Cluster Operator),
making it a no-op instead of removing completly will make the
transition to 4.0 easier for users.
2024-07-15 12:38:01 -04:00
Diana Parra Corbacho 3bbda5bdba Remove classic mirror queues 2024-06-04 13:00:31 +02:00
Michael Klishin c4ae6f30b0
Basic tests for the new CLI command #10304 2024-01-26 20:29:03 -05:00
Alex Valiushko 2177d4a5c8 add ability to list queues with local promotable replicas 2024-01-24 12:25:39 -08:00
Michael Klishin 1b642353ca
Update (c) according to [1]
1. https://investors.broadcom.com/news-releases/news-release-details/broadcom-and-vmware-intend-close-transaction-november-22-2023
2023-11-21 23:18:22 -05:00
Diana Parra Corbacho 8df94cc13c CLI: commands to list policies / operator policies with CMQ
rabbitmq-queues list_operator_policies_with_classic_queue_mirroring
rabbitmq-queues list_policies_with_classic_queue_mirroring
2023-11-06 07:20:08 -05:00
Alex Valiushko 4df3080fa1 New quorum queue members join as temporary non-voters
Because both `add_member` and `grow` default to Membership status `promotable`,
new members will have to catch up before they are considered cluster members.
This can be overridden with either `voter` or (permanent `non_voter` statuses.
The latter one is useless without additional tooling so kept undocumented.

- non-voters do not affect quorum size for election purposes
- `observer_cli` reports their status with lowercase 'f'
- `rabbitmq-queues check_if_node_is_quorum_critical` takes voter status into
account
2023-10-04 11:14:07 -07:00
Michael Klishin c9221bd717
Improve rabbitmq-queues {add,delete}_member error messages
when target queue was not found.
2023-05-02 13:28:29 +04:00
Michael Klishin d5f16d4ce6
mix format 2023-05-02 13:08:31 +04:00
Michael Klishin 29d17f05cd
rabbitmq-queues add_member: extract the correct argument
during execution environment validation.
2023-05-02 12:14:26 +04:00
Michael Klishin 247452de5d
rabbitmq-queues add_member: add a missing import 2023-05-02 11:08:00 +04:00
Michael Klishin d4a2d48cea
rabbitmq-queues: validate cluster membership of the argument
Specifically of the node where new replicas should be
placed.

Closes #8007
2023-05-02 10:55:31 +04:00
Rin Kuryloski bdb2046185
Add rabbitmq_cli dialyze to bazel (#7066)
* Add rabbitmq_cli dialyze to bazel

and fix a number of warnings

Because we stop mix from recompiling rabbit_common in bazel, many
unknown functions are reported, so this dialyzer analysis is somewhat
incomplete.

* Use erlang dialyzer for rabbitmq_cli rather than mix dialyzer

Since this resolves all of the rabbit functions, there are far fewer
unknown functions.

Requires yet to be released rules_erlang 3.9.2

* Temporarily use pre-release rules_erlang

So that checks can run on this PR without a release

* Fix additional dialyzer warnings in rabbitmq_cli

* rabbitmq_cli: mix format

* Additional fixes for ignored return values

* Revert "Temporarily use pre-release rules_erlang"

This reverts commit c16b5b6815.

* Use rules_erlang 3.9.2
2023-01-31 15:05:52 +01:00
Michael Klishin ec4f1dba7d
(c) year bump: 2022 => 2023 2023-01-01 23:17:36 -05:00
Arnaud Cogoluègnes d3caa1cdaa
Merge pull request #6440 from rabbitmq/stream-balancing
Streams rebalancing
2022-12-14 16:51:30 +01:00
Arnaud Cogoluègnes 41c6e55c2a
Fix typos 2022-12-13 11:01:35 +01:00
Péter Gömöri 88877c654c Fix error filtering and printing in queue grow/shrink commands 2022-12-08 18:02:31 +01:00
Michal Kuratczyk feff12cbe2
Stream rebalancing support 2022-11-29 18:59:50 +01:00
Michal Kuratczyk d8ff99180b
Consider streams when quorum critical check (#6448)
Extended the quorum critical check to also consider streams and their
potential unavailability if the nodes is stopped.
2022-11-23 15:24:26 +01:00
Ayanda Dube 4cbbaad2df mix format rabbitmq_cli 2022-10-02 18:54:11 +01:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Karl Nilsson 9bcd51c2a5 Correct help text for rabbitmq-queue grow command 2021-05-26 14:20:04 +01:00
dcorbacho 2998234f48 Move stream_status command to streams
Keeps the alias to diagnostics and queues
2021-04-30 11:33:05 +02:00
dcorbacho 310a483221 CLI command to for stream details
rabbitmq-queues stream_status [--tracking] <queue>
If the --tracking option is enabled, it returns a table with all offset tracking
for that queue.
2021-04-13 15:29:40 +01:00
Michael Klishin 17526987c6
Bump (c) year 2021-02-14 00:54:01 +03:00
Michael Klishin 68c04358a5
Drive-by change: improve wording used by 'rabbitmq-queues rebalance' 2021-02-09 21:02:52 +03:00
Michael Klishin b5bdfe701b Don't consider nodes in maintenance mode to be quorum critical
they should have transferred their QQ replicas to its peers
and won't be considered for new replica placement
or Raft leader elections.

Closes #2469.
2020-10-19 17:29:12 +03:00
Michael Klishin 664db6c28f Handle cases when there's no message to peek at 2020-09-21 12:33:45 +03:00
Michael Klishin 446e164f27 'rabbitmq-queues peek': tighter position validation, basic JSON formatter support 2020-09-21 12:00:45 +03:00
Michael Klishin 09f60618db 'rabbitmq-queues peek': use MergesDefaultVirtualHost 2020-09-20 20:14:49 +03:00
Michael Klishin e9919a9651 peek command: limit to rabbitmq-queues 2020-09-20 20:13:31 +03:00
Michael Klishin aa2b985461 Merge branch 'master' into qq-peek-command 2020-09-20 20:02:53 +03:00
Michael Klishin 28a5f4fc45 Improve error handling, including with --formatter=json 2020-09-18 11:58:15 +03:00
Michael Klishin f16166d29b rabbitmq-queues reclaim_quorum_memory: restore --vhost mention in usage
apparently quite a few commands have it, even though it's
documented in the general/global parameters section.
2020-09-18 10:18:11 +03:00
Michael Klishin a6e17863fb Introduce RabbitMQ.CLI.Core.MergesDefaultVirtualHost
Despite being the implicit default, the "/" virtual host
may be required in function assertions, so an explicit
merge can still be necessary.

Lets introduce a reusable macro module for this.
2020-09-18 10:00:52 +03:00
Michael Klishin 9ba1f594f7 Wording 2020-09-18 08:15:42 +03:00
dcorbacho dd5bed6308 Reclaim quorum memory command 2020-09-16 12:38:55 +01:00
kjnilsson 53a5839ae7 Quorum queue peek command 2020-09-14 12:05:46 +01:00
dcorbacho 679ca254f3 Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-11 19:23:07 +01:00
Michael Klishin 9f031d3f0b Special case single node clusters for 'rabbitmq-queues check_if_node_is_quorum_critical'
References rabbitmq/rabbitmq-cli#432
2020-07-01 18:25:06 +03:00
Michael Klishin 24947666b9 if a node is the only cluster member, pass on the mirror sync critical check
Per discussion with @harshac, @ansd

Closes rabbitmq/rabbitmq-cli#432
2020-07-01 01:46:31 +03:00
Michael Klishin 209acc6396 Rename Rabbitmq.Atom.Coerce to RabbitMQ.CLI.Core.DataCoercion
to follow the existing core (library, utility) module
naming convention.
2020-06-26 01:34:03 +03:00