summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-06-11 11:22:57 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-06-11 11:22:57 +0100
commitf52e46697c016767e504f49693500df8393d897f (patch)
tree300a18b99b898433350af4111faa5f78bde0311b
parent93923c729f9611ccc25912354efaaeffa55feed4 (diff)
downloadrabbitmq-server-f52e46697c016767e504f49693500df8393d897f.tar.gz
Show a warning if list fails to contact a node.
-rw-r--r--src/rabbit_plugins_main.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rabbit_plugins_main.erl b/src/rabbit_plugins_main.erl
index a1243b77..98418d8c 100644
--- a/src/rabbit_plugins_main.erl
+++ b/src/rabbit_plugins_main.erl
@@ -221,10 +221,11 @@ format_plugins(Node, Pattern, Opts, PluginsFile, PluginsDir) ->
AllEnabled = rabbit_plugins:dependencies(false, EnabledExplicitly,
AvailablePlugins),
EnabledImplicitly = AllEnabled -- EnabledExplicitly,
- Running = case rpc:call(Node, rabbit_plugins, active, [], ?RPC_TIMEOUT) of
- {badrpc, _} -> [];
- Active -> Active
- end,
+ {StatusMsg, Running} =
+ case rpc:call(Node, rabbit_plugins, active, [], ?RPC_TIMEOUT) of
+ {badrpc, _} -> {"[failed to contact ~s - status not shown]", []};
+ Active -> {"* = running on ~s", Active}
+ end,
Missing = [#plugin{name = Name, dependencies = []} ||
Name <- ((EnabledExplicitly ++ EnabledImplicitly) --
plugin_names(AvailablePlugins))],
@@ -244,8 +245,8 @@ format_plugins(Node, Pattern, Opts, PluginsFile, PluginsDir) ->
minimal -> ok;
_ -> io:format(" Configured: E = explicitly enabled; "
"e = implicitly enabled; ! = missing~n"
- " | Status: * = running on ~s~n"
- " |/~n", [Node])
+ " | Status: ~s~n"
+ " |/~n", [rabbit_misc:format(StatusMsg, [Node])])
end,
[format_plugin(P, EnabledExplicitly, EnabledImplicitly, Running,
plugin_names(Missing), Format, MaxWidth) || P <- Plugins1],