Skip to content

mgr: return EAGAIN when ceph-mgr request queue is full - #60194

Closed
neesingh-rh wants to merge 1 commit into
ceph:mainfrom
neesingh-rh:wip-62712
Closed

neesingh-rh wants to merge 1 commit into
ceph:mainfrom
neesingh-rh:wip-62712

Conversation

@neesingh-rh

@neesingh-rh neesingh-rh commented Oct 8, 2024 •

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/62712
Signed-off-by: Neeraj Pratap Singh [email protected]

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@neesingh-rh neesingh-rh added the cephfs Ceph File System label Oct 8, 2024
@neesingh-rh
neesingh-rh requested a review from a team October 8, 2024 12:02
@neesingh-rh
neesingh-rh requested a review from a team as a code owner October 8, 2024 12:02
Comment thread src/mon/MonCommands.h Resolved
@neesingh-rh

neesingh-rh commented Oct 8, 2024 •

Copy link
Copy Markdown
Contributor Author

This PR is open for any suggestions w.r.t. the naming of functions/commands too along with code reviews. I have used what looked apt to me.

Comment thread src/mon/MgrMonitor.cc Resolved
Comment thread src/mgr/DaemonServer.cc Resolved
Comment thread src/mgr/ActivePyModules.h Resolved
Comment thread src/mgr/ActivePyModules.h Resolved
@vshankar vshankar changed the title src: implement EAGAIN logic for clearing request queue when under… mgr: return EAGAIN when ceph-mgr request queue is full Oct 8, 2024
@vshankar
vshankar requested a review from a team October 8, 2024 13:36
Comment thread src/mgr/ActivePyModules.h Resolved
@neesingh-rh

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

Comment thread src/mgr/ActivePyModule.h Resolved
Comment thread src/mgr/DaemonServer.cc Resolved
Comment thread src/mgr/DaemonServer.cc Resolved
@github-actions github-actions Bot added the stale label Feb 13, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

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

@neesingh-rh after reading the discussion at https://tracker.ceph.com/issues/62712, i think the consensus is to have

  1. an opt-in and per-module limit
  2. generic solution which applies to all modules

but this pr gets this wrong. as it uses a single global mod_finisher_cnt and a single global max_queue_len in ActivePyModules. So all modules share one counter and one threshold. could you help me understand how you implement the per-module limit with these global counter shared by all modules?

@dparmar18

Copy link
Copy Markdown
Contributor

This is interesting, I'd like to see if this is implemented per module since it has a relevant use case in audit logging feature (#66946)

@neesingh-rh
neesingh-rh marked this pull request as draft May 11, 2026 09:02
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Jul 10, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Aug 9, 2026
@github-project-automation github-project-automation Bot moved this from Review in progress to Done in Ceph-Dashboard Aug 9, 2026
@NitzanMordhai

Copy link
Copy Markdown
Contributor

@neesingh-rh are you planning to continue with that PR? or can i take over that one?

NitzanMordhai added a commit to NitzanMordhai/ceph that referenced this pull request Oct 22, 2026
A module's commands wait on its finisher thread while holding their
client message throttle slot. If the module is slow or stuck (e.g.
volumes blocked on an unresponsive MDS), its queued commands can fill
mgr_client_messages and the mgr stops reading commands from all
clients, including ones for other modules and native mgr commands.

Add an opt-in per-module option, mgr/<module>/max_command_queue_length.
DaemonServer counts commands queued or running per module and replies
EAGAIN instead of queueing once the limit is reached. The limit is read
in C++ on each command, so a change applies even while the module's
thread is stuck. The count and the number of rejections are exported as
cmd_in_flight and cmd_eagain in the mgr_module_<name> perf counters.

Based on ceph#60194

Fixes: https://tracker.ceph.com/issues/62712
Co-authored-by: Neeraj Pratap Singh <[email protected]>
Signed-off-by: Nitzan Mordechai <[email protected]>
Assisted-by: Claude
@neesingh-rh

neesingh-rh commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

@neesingh-rh are you planning to continue with that PR? or can i take over that one?

No worries! I was busy with some other tasks and couldn't look into after having some updates further. I will look into your PR changes

NitzanMordhai added a commit to NitzanMordhai/ceph that referenced this pull request Oct 25, 2026
A module's commands wait on its finisher thread while holding their
client message throttle slot. If the module is slow or stuck (e.g.
volumes blocked on an unresponsive MDS), its queued commands can fill
mgr_client_messages and the mgr stops reading commands from all
clients, including ones for other modules and native mgr commands.

Add an opt-in per-module option, mgr/<module>/max_command_queue_length.
DaemonServer counts commands queued or running per module and replies
EAGAIN instead of queueing once the limit is reached. The limit is read
in C++ on each command, so a change applies even while the module's
thread is stuck. The count and the number of rejections are exported as
cmd_in_flight and cmd_eagain in the mgr_module_<name> perf counters.

Based on ceph#60194

Fixes: https://tracker.ceph.com/issues/62712
Co-authored-by: Neeraj Pratap Singh <[email protected]>
Signed-off-by: Nitzan Mordechai <[email protected]>
Assisted-by: Claude
NitzanMordhai added a commit to NitzanMordhai/ceph that referenced this pull request Nov 19, 2026
A module's commands wait on its finisher thread while holding their
client message throttle slot. If the module is slow or stuck (e.g.
volumes blocked on an unresponsive MDS), its queued commands can fill
mgr_client_messages and the mgr stops reading commands from all
clients, including ones for other modules and native mgr commands.

Add an opt-in per-module option, mgr/<module>/max_command_queue_length.
DaemonServer counts commands queued or running per module and replies
EAGAIN instead of queueing once the limit is reached. The limit is read
in C++ on each command, so a change applies even while the module's
thread is stuck. The count and the number of rejections are exported as
cmd_in_flight and cmd_eagain in the mgr_module_<name> perf counters.

Based on ceph#60194

Fixes: https://tracker.ceph.com/issues/62712
Co-authored-by: Neeraj Pratap Singh <[email protected]>
Signed-off-by: Nitzan Mordechai <[email protected]>
Assisted-by: Claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants