Skip to content

monitor: Enhance historic ops command output and error handling - #64038

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
NitzanMordhai:wip-nitzan-mon-ops-historic-dump
Jul 31, 2025
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
NitzanMordhai:wip-nitzan-mon-ops-historic-dump

Conversation

@NitzanMordhai

@NitzanMordhai NitzanMordhai commented Jun 19, 2025 •

Copy link
Copy Markdown
Contributor

Dumping monitor historic operations currently yields no results and incorrectly issues an error message indicating that "mon_enable_op_tracker" is not enabled, even when it should be.

This commit addresses these issues by:

  • Adding previously missing commands for historic operations.
  • Correcting the dump operations check to only issue an error when "mon_enable_op_tracker" is genuinely not enabled.
  • Tracking "mon_enable_op_tracker" changes
  • Refactoring and organizing the historic operations dump command code.
  • Improving the appearance and clarity of error messages.

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

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

Dumping monitor historic operations currently yields no results
and incorrectly issues an error message indicating that
"mon_enable_op_tracker" is not enabled, even when it should be.

This commit addresses these issues by:
- Adding previously missing commands for historic operations.
- Correcting the dump operations check to only issue an error when
  "mon_enable_op_tracker" is genuinely not enabled.
- Tracking "mon_enable_op_tracker" changes
- Refactoring and organizing the historic operations dump command code.
- Improving the appearance and clarity of error messages.

Fixes: https://tracker.ceph.com/issues/71725
Signed-off-by: Nitzan Mordechai <[email protected]>
@NitzanMordhai
NitzanMordhai requested a review from a team as a code owner June 19, 2025 09:04
@NitzanMordhai
NitzanMordhai requested a review from Matan-B June 19, 2025 09:05
Comment thread src/mon/Monitor.cc
start_election();
elector.stop_participating();
out << "stopped responding to quorum, initiated new election";
} else if (command == "ops") {

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.

Oops, I would prefer to keep this option due to compatibility reasons.
Perhaps we can warn / deprecate.

UPDATE: re-added later.

Comment thread src/mon/Monitor.cc
err << "op_tracker tracking is not enabled now, so no ops are tracked currently, even those get stuck. \
please enable \"mon_enable_op_tracker\", and the tracker will start to track new ops received afterwards.";
} else if (command == "dump_ops_in_flight" ||
command == "ops" ||

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.

OK, the ops command is kept for compatibility reasons.

Comment thread src/mon/Monitor.cc
"mon_debug_extra_checks"s,
"mon_debug_block_osdmap_trim"s
"mon_debug_block_osdmap_trim"s,
"mon_enable_op_tracker"s,

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.

OK, OSD has osd_enable_op_tracker.

@Naveenaidu

Copy link
Copy Markdown
Contributor

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