Skip to content

Commit

Permalink
Monitor: forward report command to leader
Browse files Browse the repository at this point in the history
The `ceph report` section on `osdmap_clean_epochs` is empty if a peon
responds. Forward this command to the leader.

Fixes: https://tracker.ceph.com/issues/47273
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
  • Loading branch information
dvanders committed Feb 15, 2022
1 parent a3e632a commit ae04ea5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3656,7 +3656,16 @@ void Monitor::handle_command(MonOpRequestRef op)
rs = "";
r = 0;
} else if (prefix == "report") {

// some of the report data is only known by leader, e.g. osdmap_clean_epochs
if (!is_leader() && !is_peon()) {
dout(10) << " waiting for quorum" << dendl;
waitfor_quorum.push_back(new C_RetryMessage(this, op));
return;
}
if (!is_leader()) {
forward_request_leader(op);
return;
}
// this must be formatted, in its current form
if (!f)
f.reset(Formatter::create("json-pretty"));
Expand Down

0 comments on commit ae04ea5

Please sign in to comment.