Skip to content

common/admin_socket: use peer features for tell command descriptions - #72441

Open
yzhan298 wants to merge 1 commit into
ceph:mainfrom
yzhan298:fix-json-format-on-old-client
Open

yzhan298 wants to merge 1 commit into
ceph:mainfrom
yzhan298:fix-json-format-on-old-client

Conversation

@yzhan298

@yzhan298 yzhan298 commented Oct 6, 2026

Copy link
Copy Markdown

"ceph tell" fetches get_command_descriptions before sending a command, but GetdescsHook encoded them with CEPH_FEATURES_ALL, so the "positional" key was never dropped for pre-quincy peers. MDS replies always include it (via "quiesce db"), and pre-quincy ceph_argparse fails with "TypeError: ... unexpected keyword argument 'positional'", breaking every "ceph tell mds.*" from such clients.

Answer get_command_descriptions with the connection's features, as the mon and mgr already do; local admin socket requests are unchanged. Add a unit test for both encodings.

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

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.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@vshankar vshankar self-assigned this Oct 23, 2026

@vshankar vshankar left a comment

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.

Otherwise LGTM.

Comment thread src/common/admin_socket.cc Resolved
Comment thread src/common/admin_socket.h Resolved
@kamoltat

kamoltat commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

@yzhan298 Just need to address Venky's comment and fix the merge conflict

"ceph tell" fetches get_command_descriptions before sending a command,
but GetdescsHook encoded them with CEPH_FEATURES_ALL, so the
"positional" key was never dropped for pre-quincy peers. MDS replies
always include it (via "quiesce db"), and pre-quincy ceph_argparse
fails with "TypeError: ... unexpected keyword argument 'positional'",
breaking every "ceph tell mds.*" from such clients.

Answer get_command_descriptions with the connection's features, as
the mon and mgr already do; local admin socket requests are unchanged.
Add a unit test for both encodings.

Fixes: https://tracker.ceph.com/issues/81496
Signed-off-by: Steven Zhang <[email protected]>
@yzhan298
yzhan298 force-pushed the fix-json-format-on-old-client branch from 2b67c76 to e8081d6 Compare October 29, 2026 20:00
@yzhan298

Copy link
Copy Markdown
Author

@yzhan298 Just need to address Venky's comment and fix the merge conflict

Yep, just updated.

@vshankar
vshankar self-requested a review November 3, 2026 06:25

@vshankar vshankar left a comment

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.

LGTM.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath1-testing-20261114.051618-main.

@vshankar

Copy link
Copy Markdown
Contributor

jenkins test windows

1 similar comment
@yzhan298

Copy link
Copy Markdown
Author

jenkins test windows

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.

5 participants