From: John Spray Date: Mon, 19 Feb 2018 15:19:07 +0000 (-0500) Subject: mgr: quieten logging on missing OSD stats X-Git-Tag: v12.2.5~50^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=686dff7915ef3ef71b1f90d018344a60d9bb27c8;p=ceph.git mgr: quieten logging on missing OSD stats This is only cause for concern if the OSD is actually up, and even then it can also happen at startup, so we shouldn't be logging it as an error. Fixes: https://tracker.ceph.com/issues/23017 Signed-off-by: John Spray (cherry picked from commit b6b2b07fe9eba4ba677403b68db6b0559674188e) --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index ee9bddf9718..504adb53cd9 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -917,7 +917,11 @@ int64_t PGMap::get_rule_avail(const OSDMap& osdmap, int ruleno) const min = proj; } } else { - dout(0) << "Cannot get stat of OSD " << p->first << dendl; + if (osdmap.is_up(p->first)) { + // This is a level 4 rather than an error, because we might have + // only just started, and not received the first stats message yet. + dout(4) << "OSD " << p->first << " is up, but has no stats" << dendl; + } } } return min;