From: Zhiqiang Wang Date: Wed, 14 Sep 2016 10:43:41 +0000 (-0400) Subject: mon: don't set last_osd_report when the pg stats msg is ignored X-Git-Tag: v12.0.0~123^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8ba3157677b2f7aeaa1e656918510cacb8bb98c;p=ceph.git 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 --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index f83a92413761..f604b6ffa1c3 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -772,14 +772,14 @@ 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)) { dout(1) << " ignoring stats from non-active osd." << dendl; 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;