Skip to content

Commit

Permalink
Merge pull request #51258 from k0ste/wip-56604-pacific
Browse files Browse the repository at this point in the history
pacific: Monitor: forward report command to leader

Reviewed-by: Neha Ojha <nojha@redhat.com>
  • Loading branch information
yuriw committed May 23, 2023
2 parents bb06a6d + 8a1b190 commit 05d7557
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 @@ -3692,7 +3692,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 05d7557

Please sign in to comment.