Skip to content

rgw/radosgw-admin: remove unused CLI locals and macros - #71569

Merged
anrao19 merged 1 commit into
ceph:mainfrom
RaminNietzsche:wip-rgw-admin-dead-vars
Oct 13, 2026
Merged

anrao19 merged 1 commit into
ceph:mainfrom
RaminNietzsche:wip-rgw-admin-dead-vars

Conversation

@RaminNietzsche

@RaminNietzsche RaminNietzsche commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

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.

Context (split from #71462)

This PR is the first in a planned series spun out of the larger
radosgw-admin modularization work in #71462.

Reviewing that WIP as one change set is difficult and time-consuming. To
reduce merge risk and keep review rounds focused, I am landing small,
behavior-neutral slices on main first
—each PR is easy to verify
independently—before stacking the structural modularization on top.

The end goal is that the combined series covers everything in #71462 (and
follow-up improvements from review), after which #71462 itself can be closed.

cc @chardan — you reviewed much of the modularization options/wiring feedback
on #71462; this slice removes only dead locals/macros that predate that work
and do not change supported CLI behavior. Happy to adjust the split order if
you prefer a different sequencing.

Summary

Remove dead locals, argparse branches, and the unused CHECK_SUCCESS macro in
radosgw-admin that parsed CLI flags (or were defined) but never read the
values. This is behavior-neutral cleanup: supported commands and flags
(global-cors get, --client-ids, --topic, --notification-id, etc.) are
unchanged.

Removed unused locals / flags / macros:

  • CHECK_SUCCESS (defined, never used)
  • errs
  • gcors_allow_* and --allow-origin, --allow-methods, --allow-headers, --expose-headers (only global-cors get exists; it reads g_conf())
  • client_id, op_id and --client-id, --op-id (--client-ids remains for OIDC)
  • opt_realm_name, opt_zone_name, opt_zonegroup_name (config name copies; init_realm_param uses the *_id optionals)
  • sub_name, event_id and --subscription, --event-id (pubsub uses --topic / --notification-id)

Also drop the matching --subscription / --event-id entries from
doc/man/8/radosgw-admin.rst so the man page matches supported flags.

Testing

Local build and tests (Release, WITH_RADOSGW_RADOS=ON, vstart cluster):

  • ninja radosgw-admin
  • cram src/test/cli/radosgw-admin/help.t — passed
  • ninja ceph_test_cls_rgw_log ceph_test_cls_rgw_meta ceph_test_cls_rgw_admin_account_quota_set — built and run against local ceph.conf
  • Manual smoke: radosgw-admin user list, bucket list, realm list, global-cors get
  • Verified removed flags now report invalid flag; --client-ids and --notification-id still parse

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.

Drop dead locals, argparse handlers, and the unused CHECK_SUCCESS macro
from radosgw-admin.cc. Sync radosgw-admin.rst with supported pubsub
flags. Behavior of supported commands and flags is unchanged.

Signed-off-by: ramin.najarbashi <[email protected]>
@RaminNietzsche
RaminNietzsche force-pushed the wip-rgw-admin-dead-vars branch from de6b832 to b47f29c Compare September 6, 2026 17:24
@RaminNietzsche RaminNietzsche changed the title rgw/radosgw-admin: remove unused CLI locals rgw/radosgw-admin: remove unused CLI locals and macros Sep 6, 2026
@RaminNietzsche

Copy link
Copy Markdown
Member Author

@chardan — context for this small PR:

This is slice 1 of an incremental landing plan for the radosgw-admin work in #71462. Rather than asking reviewers to absorb the full modularization diff at once, I am opening a series of small, behavior-neutral PRs on main first (dead code removal, then structural splits, then follow-ups from your options/wiring review).

Goals:

  • lower review load per PR
  • lower merge risk per step
  • make each change easy to verify locally

Once the series is merged, the cumulative result should cover everything in #71462 (plus the review fix-ups), and we can close #71462.

This PR only removes unused locals/macros and syncs the man page; no modularization yet. Feedback on the split order is welcome.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

Hi — gentle ping on slice 1.

I posted the full landing plan on #71462 before. This PR is the first step: it only removes dead locals/macros and syncs two pubsub flags in the man page. No modularization yet, and supported commands/flags should behave the same as before.

The later slices (#71575, #71578, and the rest of the series) all depend on this landing first — I’m rebasing each one from fresh main after the previous merge, so I’d rather not stack more radosgw-admin.cc diffs on top while this is still open.

CI was green on the last run. I can rebase on latest main and re-run tests if that helps review.

cc @chardan — would appreciate a look when you have a moment. Happy to adjust anything if the split doesn’t work for you.

@chardan chardan 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.

Yay! Fewer macros in the world. We live in wonderful times.

@anrao19

anrao19 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-29-10:04.

@anrao19

anrao19 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-29-10:04.

pr testing completed and approved by @ivancich, more details in : https://tracker.ceph.com/issues/81104.
@RaminNietzsche, if no further testing needed then this can be merged

@anrao19
anrao19 merged commit acaffe9 into ceph:main Oct 13, 2026
20 checks passed

@chardan chardan 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!

} \
} while (0)

#define CHECK_SUCCESS(x, msg) \

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.

Vanishing macros generally fill my heart with contentment and peace.

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