mirror of
https://github.com/ceph/ceph
synced 2025-01-15 07:23:16 +00:00
Merge pull request #45042 from dvanders/report_leader
Monitor: forward report command to leader Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
commit
ec371278ee
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user