From a8ba3157677b2f7aeaa1e656918510cacb8bb98c Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Wed, 14 Sep 2016 06:43:41 -0400 Subject: [PATCH] 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 --- src/mon/PGMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index f83a924137612..f604b6ffa1c3a 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; -- 2.47.3