Usage::
- ceph mgr module ls
+ ceph mgr module ls {detail}
Subcommand ``module enable`` will enable a manager module. Available modules are included in MgrMap and visible via ``mgr dump``.
-------------
Use the command ``ceph mgr module ls`` to see which modules are
-available, and which are currently enabled. Enable or disable modules
+available, and which are currently enabled. Use ``ceph mgr module ls detail``
+to view detailed metadata about disabled modules. Enable or disable modules
using the commands ``ceph mgr module enable <module>`` and
``ceph mgr module disable <module>`` respectively.
string prefix;
cmd_getval(cmdmap, "prefix", prefix);
+
int r = 0;
if (prefix == "mgr stat") {
}
f->flush(rdata);
} else if (prefix == "mgr module ls") {
+ string detail;
+ cmd_getval(cmdmap, "detail", detail);
+
f->open_object_section("modules");
{
f->open_array_section("always_on_modules");
for (auto& p : map.available_modules) {
if (map.modules.count(p.name) == 0 &&
map.get_always_on_modules().count(p.name) == 0) {
- // For disabled modules, we show the full info, to
- // give a hint about whether enabling it will work
- p.dump(f.get());
+ if (detail == "detail") {
+ // For disabled modules, we show the full info if the detail
+ // parameter is enabled, to give a hint about whether enabling it will work
+ p.dump(f.get());
+ } else {
+ // Otherwise, we give a shortened summary by default
+ f->dump_string("module", p.name);
+ }
}
}
f->close_section();
"mgr", "r")
COMMAND("mgr fail name=who,type=CephString,req=false",
"treat the named manager daemon as failed", "mgr", "rw")
-COMMAND("mgr module ls",
- "list active mgr modules", "mgr", "r")
+COMMAND("mgr module ls name=detail,type=CephChoices,strings=detail,req=false",
+ "list active mgr modules", "mgr", "r")
COMMAND("mgr services",
"list service endpoints provided by mgr modules",
"mgr", "r")