Skip to content

Commit 73b4fd5

Browse files
mkuratczykmergify[bot]
authored andcommitted
Don't return khepri status when khperi_db is disabled
When khepri_db feature flag is disabled, Khepri servers are running but are not clustered. In this case `rabbit_khepri:status/0` shows that all nodes are leaders, which is confusing and scary (even though actually harmless). Instead, we now just print that mnesia is in use. (cherry picked from commit b48d4bf) (cherry picked from commit bcf910d)
1 parent 7e653a0 commit 73b4fd5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/metadata_store_status_command.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ defmodule RabbitMQ.CLI.Diagnostics.Commands.MetadataStoreStatusCommand do
1414
use RabbitMQ.CLI.Core.RequiresRabbitAppRunning
1515

1616
def run([] = _args, %{node: node_name}) do
17-
:rabbit_misc.rpc_call(node_name, :rabbit_khepri, :status, [])
17+
case :rabbit_misc.rpc_call(node_name, :rabbit_feature_flags, :is_enabled, [:khepri_db]) do
18+
true ->
19+
:rabbit_misc.rpc_call(node_name, :rabbit_khepri, :status, [])
20+
false ->
21+
[[{<<"Metadata Store">>, "mnesia"}]]
22+
end
1823
end
1924

2025
use RabbitMQ.CLI.DefaultOutput

0 commit comments

Comments
 (0)