Bug #82136
openmgr/DaemonServer: op-tracker marks mon command finished before the mon reply arrives
0%
Description
DaemonServer's ReplyOnFinish context calls MgrOpRequest::mark_finish_mon_command() from its constructor body rather than from finish(). The constructor runs as soon as the Context is allocated — before MonClient dispatches the command and before any mon reply is received — so the op-tracker records the "mon command finished" flag-point while the op is still in flight waiting on the mon.
As a result, op-tracker dumps (ceph daemon mgr.<id> dump_ops_in_flight and the op_tracker history) report a mon command as finished for ops that are actually still blocked on the monitor — for example while a mon election is in progress — making the op-tracker misleading for diagnosing stuck mon commands.
Fix: move the mark_finish_mon_command() call out of the ReplyOnFinish constructor and into ReplyOnFinish::finish(), which MonClient invokes when the mon reply actually arrives. The finish flag-point is then recorded only after the command has completed.
Location: src/mgr/DaemonServer.cc, ReplyOnFinish (around line 1038).
SZ Updated by Steven Zuraski about 1 month ago
- Related to Bug #81340: mgr: MgrOpRequest::mark_finish_mon_command passes flag_start_mon_command instead of flag_finish_mon_command (copy-paste bug) added
SZ Updated by Steven Zuraski about 1 month ago
- Pull request ID set to 73120
SZ Updated by Steven Zuraski about 1 month ago
- Status changed from New to Fix Under Review
SZ Updated by Steven Zuraski 23 days ago
- Related to Enhancement #83014: mgr: add sanity/smoke test scenarios covering MgrOpRequest flag-point ordering for mon commands added