mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
mon: don't set last_osd_report when the pg stats msg is ignored
In some cases, this may lead to mon wrongly marking an osd down because of no pg stats after a specified time period. Signed-off-by: Zhiqiang Wang <zhiqiang@xsky.com>
This commit is contained in:
parent
60c36674bd
commit
a8ba315767
@ -772,8 +772,6 @@ bool PGMonitor::prepare_pg_stats(MonOpRequestRef op)
|
||||
return false;
|
||||
}
|
||||
|
||||
last_osd_report[from] = ceph_clock_now();
|
||||
|
||||
if (!stats->get_orig_source().is_osd() ||
|
||||
!mon->osdmon()->osdmap.is_up(from) ||
|
||||
stats->get_orig_source_inst() != mon->osdmon()->osdmap.get_inst(from)) {
|
||||
@ -781,6 +779,8 @@ bool PGMonitor::prepare_pg_stats(MonOpRequestRef op)
|
||||
return false;
|
||||
}
|
||||
|
||||
last_osd_report[from] = ceph_clock_now();
|
||||
|
||||
if (!pg_stats_have_changed(from, stats)) {
|
||||
dout(10) << " message contains no new osd|pg stats" << dendl;
|
||||
MPGStatsAck *ack = new MPGStatsAck;
|
||||
|
Loading…
Reference in New Issue
Block a user