Project

General

Profile

Actions

Bug #82136

open
SZ SZ

mgr/DaemonServer: op-tracker marks mon command finished before the mon reply arrives

Bug #82136: mgr/DaemonServer: op-tracker marks mon command finished before the mon reply arrives

Added by Steven Zuraski about 1 month ago. Updated about 1 month ago.

Status:
Fix Under Review
Priority:
Normal
Category:
ceph-mgr
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

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).


Related issues 2 (2 open — 0 closed)

Related to mgr - Bug #81340: mgr: MgrOpRequest::mark_finish_mon_command passes flag_start_mon_command instead of flag_finish_mon_command (copy-paste bug)Fix Under ReviewSteven Zuraski

Actions
Related to Ceph - Enhancement #83014: mgr: add sanity/smoke test scenarios covering MgrOpRequest flag-point ordering for mon commandsNew

Actions

SZ Updated by Steven Zuraski about 1 month ago Actions #1

  • 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 Actions #2

  • Pull request ID set to 73120

SZ Updated by Steven Zuraski about 1 month ago Actions #3

  • Status changed from New to Fix Under Review

SZ Updated by Steven Zuraski 23 days ago Actions #4

  • Related to Enhancement #83014: mgr: add sanity/smoke test scenarios covering MgrOpRequest flag-point ordering for mon commands added
Actions

Also available in: PDF Atom