Project

General

Profile

Cleanup #45322

mgr: simplify 'module ls' output

Added by Ernesto Puerta 9 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
ceph-mgr
Target version:
% Done:

0%

Tags:
Backport:
nautilus, octopus
Reviewed:
Affected Versions:
Pull request ID:

Description

Before PR https://github.com/ceph/ceph/pull/19235, ceph mgr module ls simply printed a short list of available and enabled modules that easily fit into the screen height.

However, after that PR, the output includes lots of metadata for disable modules, which makes hard to understand which modules are always on, available/disabled:

{
    "always_on_modules": [
        "balancer",
        "crash",
        "devicehealth",
        "orchestrator",
        "osd_support",
        "pg_autoscaler",
        "progress",
        "rbd_support",
        "status",
        "telemetry",
        "volumes" 
    ],
    "enabled_modules": [
        "cli",
        "dashboard",
        "iostat",
        "prometheus",
        "restful" 
    ],
    "disabled_modules": [
        {
            "name": "alerts",
            "can_run": true,
            "error_string": "",
            "module_options": {
                "interval": {
                    "name": "interval",
                    "type": "secs",
                    "level": "advanced",
                    "flags": 1,
                    "default_value": "60",
                    "min": "",
                    "max": "",
                    "enum_allowed": [],
                    "desc": "How frequently to reexamine health status",
                    "long_desc": "",
                    "tags": [],
                    "see_also": []
                },
                "log_level": {
...

A suggestion would be to only dump that metadata if 'detail' option is present (similar to other ceph commands).

Also available in: Atom PDF