]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: stuck peering since warning is misleading 57408/head
authorshreyanshjain7174 <ssanchet@redhat.com>
Mon, 26 Dec 2022 04:43:34 +0000 (22:43 -0600)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Fri, 10 May 2024 17:16:22 +0000 (00:16 +0700)
When osds restart or manually marked down it is common to see a HEALTH_WARN claiming that PGs have been stuck peering since awhile, even though they were active. The warning is to be issued if they really are stuck peering longer than 60s.

Fixes: https://tracker.ceph.com/issues/51688
Signed-off-by: shreyanshjain7174 <ssanchet@redhat.com>
(cherry picked from commit 48a8a6c78f5c2efa2a15bf78bed7de8394ec5370)

src/mon/PGMap.cc

index 48cfb7b4dc022a2078c74add230bfff123fb9a37..16fa71c84c069b2eecb741b9767aa083879ea7f1 100644 (file)
@@ -3849,32 +3849,6 @@ static void _try_mark_pg_stale(
     newstat->last_unstale = ceph_clock_now();
   }
 
-    if ((cur.state & PG_STATE_PEERING) == 0 &&
-      cur.acting_primary != -1 &&
-      osdmap.is_down(cur.acting_primary)) {
-    pg_stat_t *newstat;
-    auto q = pending_inc->pg_stat_updates.find(pgid);
-    if (q != pending_inc->pg_stat_updates.end()) {
-      if ((q->second.acting_primary == cur.acting_primary) ||
-         ((q->second.state & PG_STATE_PEERING) == 0 &&
-          q->second.acting_primary != -1 &&
-          osdmap.is_down(q->second.acting_primary))) {
-       newstat = &q->second;
-      } else {
-       // pending update is no longer down or already stale
-       return;
-      }
-    } else {
-      newstat = &pending_inc->pg_stat_updates[pgid];
-      *newstat = cur;
-    }
-    dout(10) << __func__ << " marking pg " << pgid
-            << " stale (acting_primary " << newstat->acting_primary
-            << ")" << dendl;
-    newstat->state |= PG_STATE_PEERING;
-    newstat->last_peered = ceph_clock_now();
-  }
-
 }
 
 void PGMapUpdater::check_down_pgs(