]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: remove out&down osd from daemons 54534/head
authorshimin <shimin@kuaishou.com>
Fri, 13 Oct 2023 07:54:53 +0000 (15:54 +0800)
committerPrashant D <pdhange@redhat.com>
Thu, 16 Nov 2023 22:08:50 +0000 (17:08 -0500)
When we meet a bad disk problem, we just out the osd (alreay DOWN
 state). Before osd go to DOWN, it report slow ops to mgr, and `ceph -s`
command shows `18 slow ops, oldest one blocked for 259 sec...` warnings.
This warning never gone except we restart mgr.

Fixes: https://tracker.ceph.com/issues/63195
Signed-off-by: shimin <shimin@kuaishou.com>
(cherry picked from commit 3072b113242e01ed54a2154157f734e671d13a1a)

src/mgr/Mgr.cc

index 48e50d2ae23cc915f71e13f9461a8531afce6ce5..080ddf8d4e99036590fed268c36983749aae7366 100644 (file)
@@ -525,7 +525,7 @@ void Mgr::handle_osd_map()
   cluster_state.with_osdmap_and_pgmap([this, &names_exist](const OSDMap &osd_map,
                                                           const PGMap &pg_map) {
     for (int osd_id = 0; osd_id < osd_map.get_max_osd(); ++osd_id) {
-      if (!osd_map.exists(osd_id)) {
+      if (!osd_map.exists(osd_id) || (osd_map.is_out(osd_id) && osd_map.is_down(osd_id))) {
         continue;
       }