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:
Zhiqiang Wang 2016-09-14 06:43:41 -04:00
parent 60c36674bd
commit a8ba315767

View File

@ -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;