rabbitmq-server/deps/rabbitmq_cli/test/diagnostics
Michael Klishin 09f1ab47b7
By @Ayanda-D: new CLI health check that detects QQs without an elected reachable leader #13433 (#13487)
* Implement rabbitmq-queues leader_health_check command for quorum queues

(cherry picked from commit c26edbef33)

* Tests for rabbitmq-queues leader_health_check command

(cherry picked from commit 6cc03b0009)

* Ensure calling ParentPID in leader health check execution and
reuse and extend formatting API, with amqqueue:to_printable/2

(cherry picked from commit 76d66a1fd7)

* Extend core leader health check tests and update badrpc error handling in cli tests

(cherry picked from commit 857e2a73ca)

* Refactor leader_health_check command validators and ignore vhost arg

(cherry picked from commit 6cf9339e49)

* Update leader_health_check_command description and banner

(cherry picked from commit 96b8bced2d)

* Improve output formatting for healthy leaders and support
silent mode in rabbitmq-queues leader_health_check command

(cherry picked from commit 239a69b404)

* Support global flag to run leader health check for
all queues in all vhosts on local node

(cherry picked from commit 48ba3e161f)

* Return immediately for leader health checks on empty vhosts

(cherry picked from commit 7873737b35)

* Rename leader health check timeout refs

(cherry picked from commit b7dec89b87)

* Update banner message for global leader health check

(cherry picked from commit c7da4d5b24)

* QQ leader-health-check: check_process_limit_safety before spawning leader checks

(cherry picked from commit 17368454c5)

* Log leader health check result in broker logs (if any leaderless queues)

(cherry picked from commit 1084179a2c)

* Ensure check_passed result for leader health internal calls)

(cherry picked from commit 68739a6bd2)

* Extend CLI format output to process check_passed payload

(cherry picked from commit 5f5e9922bd)

* Format leader healthcheck result log and function exports

(cherry picked from commit ebffd7d8a4)

* Change leader_health_check command scope from queues to diagnostics

(cherry picked from commit 663fc9846e)

* Update (c) line year

(cherry picked from commit df82f12a70)

* Rename command to check_for_quorum_queues_without_an_elected_leader
and use across_all_vhosts option for global checks

(cherry picked from commit b2acbae28e)

* Use rabbit_db_queue for qq leader health check lookups
and introduce rabbit_db_queue:get_all_by_type_and_vhost/2.
Update leader health check timeout to 5s and process limit
threshold to 20% of node's process_limit.

(cherry picked from commit 7a8e166ff6)

* Update tests: quorum_queue_SUITE and rabbit_db_queue_SUITE

(cherry picked from commit 9bdb81fd79)

* Fix typo (cli test module)

(cherry picked from commit 615856853a)

* Small refactor - simpler final leader health check result return on function head match

(cherry picked from commit ea07938f3d)

* Clear dialyzer warning & fix type spec

(cherry picked from commit a45aa81bd2)

* Ignore result without strict match to avoid diayzer warning

(cherry picked from commit bb43c0b929)

* 'rabbitmq-diagnostics check_for_quorum_queues_without_an_elected_leader' documentation edits

(cherry picked from commit 845230b0b380a5f5bad4e571a759c10f5cc93b91)

* 'rabbitmq-diagnostics check_for_quorum_queues_without_an_elected_leader' output copywriting

(cherry picked from commit 235f43bad58d3a286faa0377b8778fcbe6f8705d)

* diagnostics check_for_quorum_queues_without_an_elected_leader: behave like a health check w.r.t. error reporting

(cherry picked from commit db7376797581e4716e659fad85ef484cc6f0ea15)

* check_for_quorum_queues_without_an_elected_leader: handle --quiet and --silent

plus simplify function heads.

References #13433.

(cherry picked from commit 7b392315d5e597e5171a0c8196230d92b8ea8e92)

---------

Co-authored-by: Ayanda Dube <adube14@bloomberg.net>
2025-03-12 00:32:59 -04:00
..
alarms_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_alarms_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_for_quorum_queues_without_an_elected_leader_command_test.exs By @Ayanda-D: new CLI health check that detects QQs without an elected reachable leader #13433 (#13487) 2025-03-12 00:32:59 -04:00
check_if_any_deprecated_features_are_used_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_if_cluster_has_classic_queue_mirroring_policy_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_if_metadata_store_is_initialized_command_test.exs New health check CLI commands 2025-01-28 16:44:37 -05:00
check_if_metadata_store_is_initialized_with_data_command_test.exs New health check CLI commands 2025-01-28 16:44:37 -05:00
check_local_alarms_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_port_connectivity_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_port_listener_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_protocol_listener_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_running_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
check_virtual_hosts_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
cipher_suites_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
command_line_arguments_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
consume_event_stream_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
disable_auth_attempt_source_tracking_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
discover_peers_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
enable_auth_attempt_source_tracking_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
erlang_cookie_hash_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
erlang_cookie_sources_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
erlang_version_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
is_booting_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
is_running_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
list_network_interfaces_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
list_node_auth_attempt_stats_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
list_policies_that_match_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
listeners_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
log_location_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
log_tail_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
log_tail_stream_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
maybe_stuck_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
memory_breakdown_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
observer_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
os_env_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
remote_shell_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
resolve_hostname_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
resolver_info_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
runtime_thread_stats_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
schema_info_command_test.exs CLI: mix format 2025-01-02 17:00:46 -05:00
server_version_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00
tls_versions_command_test.exs Bump (c) line year 2025-01-01 17:54:10 -05:00