Skip to content

mgr: add status command#62465

Merged
batrick merged 2 commits intoceph:mainfrom
batrick:i70571
Mar 25, 2025
Merged

mgr: add status command#62465
batrick merged 2 commits intoceph:mainfrom
batrick:i70571

Conversation

@batrick
Copy link
Member

@batrick batrick commented Mar 24, 2025

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

@batrick batrick requested a review from a team as a code owner March 24, 2025 15:56
@batrick batrick requested a review from travisn March 24, 2025 15:56
Copy link
Member

@travisn travisn left a comment

Choose a reason for hiding this comment

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

Just to confirm, Rook currently calls this command for mgr status, only for a return code to confirm that the mgr daemon is alive and responding.

ceph --admin-daemon /run/ceph/ceph-mgr.a.asok status

Looks like the new command will respond to this with an exit code 0, so the new command looks like it will work, thanks.

The Rook operator relies on a `status` (asok) command to the mgr to verify it
is operational. However, this command was actually served by the CephFS
`Client` library that the ceph-mgr daemon statically linked in and used for
sending MDS commands. That statically linked client was removed via 048fc68
(case insensitive directory tree feature).

So, add a legitimate ceph-mgr status command which simply outputs an empty
dictionary and returns success (0). TBD on adding useful information.

Fixes: 048fc68
Fixes: https://tracker.ceph.com/issues/70571
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
@batrick
Copy link
Member Author

batrick commented Mar 24, 2025

This PR is under test in https://tracker.ceph.com/issues/70638.

@batrick
Copy link
Member Author

batrick commented Mar 24, 2025

jenkins test make check

Fixes: https://tracker.ceph.com/issues/70571
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
batrick added a commit to batrick/ceph that referenced this pull request Mar 25, 2025
* refs/pull/62465/head:
	qa: add test for `mgr status` command
	mgr: add status command
@batrick
Copy link
Member Author

batrick commented Mar 25, 2025

@travisn
Copy link
Member

travisn commented Mar 25, 2025

@batrick
Copy link
Member Author

batrick commented Mar 25, 2025

https://pulpito.ceph.com/pdonnell-2025-03-25_13:17:17-rados:mgr-wip-pdonnell-testing-20250324.181635-debug-distro-default-gibba/
failures are
https://tracker.ceph.com/issues/70662

The failures are independent from this PR?

yes, they already have appeared in earlier teuthology tests on main

f->close_section();
return 0;
} else {
return -ENOSYS;
Copy link
Member

Choose a reason for hiding this comment

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

Nit:

ENOSYS is for "function not supported". Does a command other than "status" qualify as a function? Why not a more general ENOTSUP?

Copy link
Member Author

Choose a reason for hiding this comment

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

ENOSYS conventionally indicates that a requested method/function/syscall is not known to the kernel (or in this case, the ceph daemon). That would be appropriate in this context.

ENOTSUP is more for the case where the system understands the request but cannot implement it because of some contextual problem.

Copy link
Member

Choose a reason for hiding this comment

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

ACK, thanks for clarifying!

@batrick batrick merged commit 47cde58 into ceph:main Mar 25, 2025
12 checks passed
@batrick batrick deleted the i70571 branch March 25, 2025 18:31
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.

4 participants