]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: quieten logging on missing OSD stats 20485/head
authorJohn Spray <john.spray@redhat.com>
Mon, 19 Feb 2018 15:19:07 +0000 (10:19 -0500)
committerJohn Spray <john.spray@redhat.com>
Mon, 19 Feb 2018 15:21:53 +0000 (10:21 -0500)
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 <john.spray@redhat.com>
src/mon/PGMap.cc

index c23a130df7d00862c290aef9938c86ac8ae8b51d..32eced38c372858f5003bba723dbe70565705c59 100644 (file)
@@ -953,7 +953,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;