Skip to content

osdc/objecter: Allow objecter to support multiple librados client setting object_requets - #67471

Merged
adamemerson merged 2 commits into
ceph:mainfrom
kchheda3:wip-objecter-multiple-clients
Aug 13, 2026
Merged

adamemerson merged 2 commits into
ceph:mainfrom
kchheda3:wip-objecter-multiple-clients

Conversation

@kchheda3

@kchheda3 kchheda3 commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

currently rgw creates multiple librados client ( one of config-store, one for rados backend driver, and one more for neorados), so objecter registers admin socket hook of objecter_requests only for the first client.
so extend objecter to support multiple librados client by allowing to set custom admin socket name.

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

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.

@kchheda3
kchheda3 marked this pull request as ready for review February 23, 2026 18:18
@kchheda3
kchheda3 requested a review from cbodley February 23, 2026 18:24
Comment thread src/neorados/RADOSImpl.cc Resolved
@adamemerson adamemerson self-assigned this Mar 9, 2026
Comment thread src/osdc/Objecter.h Resolved
Comment thread src/neorados/RADOSImpl.cc Resolved
@kchheda3
kchheda3 force-pushed the wip-objecter-multiple-clients branch from 62a3fdc to 2e00029 Compare May 12, 2026 17:05
@kchheda3
kchheda3 requested review from a team as code owners May 12, 2026 17:05
@github-actions

Copy link
Copy Markdown

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

@kchheda3
kchheda3 force-pushed the wip-objecter-multiple-clients branch from 2e00029 to 55116c7 Compare May 12, 2026 17:22
@kchheda3
kchheda3 requested review from adamemerson and cbodley May 12, 2026 17:24
@kchheda3
kchheda3 force-pushed the wip-objecter-multiple-clients branch from 55116c7 to 8e0f5bd Compare May 12, 2026 19:37
@kchheda3

kchheda3 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

ping @adamemerson
can you check again please ?

@github-actions

Copy link
Copy Markdown

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

Comment thread src/include/neorados/RADOS.hpp Resolved
Comment thread src/neorados/RADOSImpl.cc Resolved
@adamemerson

Copy link
Copy Markdown
Contributor

This needs Core and RBD testing, not just RGW testing.

Add an optional admin_socket_name parameter to the Objecter constructor
(defaulted to empty). The name is stored as a member variable and used
during init() to register the admin socket command. If non-empty, the
command registers as "objecter_requests.<name>" instead of the default
"objecter_requests", enabling multiple Objecter instances in the same
process to have distinct admin socket commands.

Signed-off-by: Krunal Chheda <[email protected]>
Use the admin socket name infrastructure to register distinct names
for each Objecter instance in the RGW process:
- Neorados client defaults to "objecter_requests.NeoRados"
- ConfigStore librados client uses "objecter_requests.ConfigStore"

This enables operators to distinguish between Objecter instances when
querying admin socket commands for debugging.

Signed-off-by: Krunal Chheda <[email protected]>
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath7-testing-20260811.152323-main.

@anrao19

anrao19 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-08-13-05:35.

@ljflores

Copy link
Copy Markdown
Member

@adamemerson
adamemerson merged commit 49fa23a into ceph:main Aug 13, 2026
7 checks passed
@kchheda3
kchheda3 deleted the wip-objecter-multiple-clients branch August 13, 2026 19:13
Comment thread src/osdc/Objecter.cc

/* Don't warn on EEXIST, happens if multiple ceph clients
* are instantiated from one process */
if (ret < 0 && ret != -EEXIST) {

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.

Dropping the EEXIST arm of the condition here introduced a regression for existing users where multiple clients are instantiated with the same name. An unwanted error is logged to stderr now:

$ sudo rbd device map -n client.wrong testimage
rbd: sysfs write failed
2026-08-09T09:44:49.690+0200 ffff99f66020 -1 client.?.objecter error registering admin socket command: (17) File exists
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (1) Operation not permitted

(Failure with EPERM is expected, error registering admin socket command message is not.)

@kchheda3 kchheda3 Aug 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Dropping the EEXIST arm of the condition here introduced a regression for existing users where multiple clients are instantiated with the same name. An unwanted error is logged to stderr now:

$ sudo rbd device map -n client.wrong testimage
rbd: sysfs write failed
2026-08-09T09:44:49.690+0200 ffff99f66020 -1 client.?.objecter error registering admin socket command: (17) File exists
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (1) Operation not permitted

(Failure with EPERM is expected, error registering admin socket command message is not.)

sorry for the un-expected behaviour @idryomov, created PR #71064 to log at stdout and at level1, so you get the expected error message in stderr and does not confuse,

Comment thread src/osdc/Objecter.cc
* are instantiated from one process */
if (ret < 0 && ret != -EEXIST) {
std::string cmd_name = "objecter_requests";
if (!m_admin_socket_name.empty()) {

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.

Perhaps for the purposes of this registration m_admin_socket_name could be defaulted to client's global ID (an integer taken as a string)? Then existing users where multiple clients are instantiated without the new set_objecter_admin_socket_name() in the picture would be taken care of. The only way to get EEXIST would be to explicitly set identical names with set_objecter_admin_socket_name() but that is something that deserves an error on stderr IMO.

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.

7 participants