]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson: add pg subcommands support in CLI
authorKautilya Tripathi <knrt@li-4c4c4544-0046-4210-804e-b1c04f423534.ibm.com>
Tue, 20 Jan 2026 13:24:38 +0000 (18:54 +0530)
committerKautilya Tripathi <kautilya.tripathi@ibm.com>
Mon, 27 Apr 2026 04:14:49 +0000 (09:44 +0530)
commita95886b8bb37f4983afd23bce78e4397ebf24ffc
tree4e48f8f71edcc7d48a4f275376252b6dc6c21cb4
parentbb50d3ba1b0f8de7adf66c689e5b87c2c9ecb68a
crimson: add pg subcommands support in CLI

Crimson OSD was missing the PG admin/tell hooks that classic OSD exposes, and it
did not accept the legacy `rados_pg_command()` / `ceph pg <pgid> <cmd>` JSON form
(e.g. `{"prefix":"pg","pgid":"1.0","cmd":"query",...}`), so `ceph pg <pgid> query`
failed.

Adds a `pg` old-form wrapper hook that exists to advertise that exists
to advertise the classic `pgid` + `cmd` + optional `arg` signature. The
runtime dispatch rewrites this to the real subcommand.

This updates parse_cmd  to rewrite `prefix=pg` requests to the requested
subcommand and remap the generic `arg` field to the concrete parameter
names (`offset` for `list_unfound`, `mulcmd` for `mark_unfound_lost`)
so validation/parsing is unambiguous.

Fixes: https://tracker.ceph.com/issues/73266
Signed-off-by: Kautilya Tripathi <kautilya.tripathi@ibm.com>
src/crimson/admin/admin_socket.cc
src/crimson/admin/pg_commands.cc
src/crimson/admin/pg_commands.h
src/crimson/osd/osd.cc