Skip to content

mon/MgrMap: Add active MGR details to structured status output - #70519

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
Prachi-Lasurkar:wip-78182-mgr-details-ceph-status-formats
Sep 4, 2026
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
Prachi-Lasurkar:wip-78182-mgr-details-ceph-status-formats

Conversation

@Prachi-Lasurkar

@Prachi-Lasurkar Prachi-Lasurkar commented Jul 24, 2026 •

Copy link
Copy Markdown

Add mgr's active_name, active_since, and standbys names to the formatter branch of MgrMap::print_summary() so that structured output formats expose the same MGR daemon details as plain text.

Fixes: https://tracker.ceph.com/issues/78182

Signed-off-by: Prachi Lasurkar <[email protected]>

Before Changes:

"mgrmap": {
    "available": true,
    "num_standbys": 1,
    "modules": [
        "cephadm",
        "dashboard",
        "iostat",
        "nfs",
        "prometheus",
        "smb"
    ]
}

After Changes:

"mgrmap": {
        "available": true,
        "active_name": "pra-testing-0.skbhfg",
        "active_since": "2026-07-21T14:43:25.758374+0000",
        "num_standbys": 2,
        "standbys": [
            "pra-testing-2.lhijrz",
            "pra-testing-1.vaupiz"
        ],
        "modules": [
            "cephadm",
            "iostat",
            "nfs",
            "nvmeof",
            "prometheus"
        ]
    }

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

Add mgr's active_name, active_since, and standbys names to the
formatter branch of MgrMap::print_summary() so that structured
output formats expose the same MGR daemon details as plain text.

Fixes: https://tracker.ceph.com/issues/78182

Signed-off-by: Prachi Lasurkar <[email protected]>
@Prachi-Lasurkar
Prachi-Lasurkar requested a review from a team as a code owner July 24, 2026 09:36
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

16 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@pdvian

pdvian commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

ok to test

Comment thread src/mon/MgrMap.cc
f->dump_string("active_name", get_active_name());
f->dump_stream("active_since") << active_change;
f->dump_int("num_standbys", standbys.size());
f->open_array_section("standbys");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: we got the Formatter::ArraySection – a RAII-style manager that handles open_array_section() and close_section() for you basing on C++ scopes. It's exception safe and, IMHO, makes the code easier to read.

However, I'm fine with going the old way here as it follows the already established convention in this code area.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath2-testing-20260727.155959-main.

@Prachi-Lasurkar

Copy link
Copy Markdown
Author

@rzarzynski, all the checks have passed on the PR. Could you please take a look and merge it when you have a chance? Thanks!

@ljflores

ljflores commented Sep 4, 2026

Copy link
Copy Markdown
Member

@SrinivasaBharath
SrinivasaBharath merged commit ba7694f into ceph:main Sep 4, 2026
22 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants