Skip to content

Commit 48a8a6c

Browse files
author
shreyanshjain7174
committed
mon: stuck peering since warning is misleading
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 <[email protected]>
1 parent 8202e72 commit 48a8a6c

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/mon/PGMap.cc

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3857,32 +3857,6 @@ static void _try_mark_pg_stale(
38573857
newstat->last_unstale = ceph_clock_now();
38583858
}
38593859

3860-
if ((cur.state & PG_STATE_PEERING) == 0 &&
3861-
cur.acting_primary != -1 &&
3862-
osdmap.is_down(cur.acting_primary)) {
3863-
pg_stat_t *newstat;
3864-
auto q = pending_inc->pg_stat_updates.find(pgid);
3865-
if (q != pending_inc->pg_stat_updates.end()) {
3866-
if ((q->second.acting_primary == cur.acting_primary) ||
3867-
((q->second.state & PG_STATE_PEERING) == 0 &&
3868-
q->second.acting_primary != -1 &&
3869-
osdmap.is_down(q->second.acting_primary))) {
3870-
newstat = &q->second;
3871-
} else {
3872-
// pending update is no longer down or already stale
3873-
return;
3874-
}
3875-
} else {
3876-
newstat = &pending_inc->pg_stat_updates[pgid];
3877-
*newstat = cur;
3878-
}
3879-
dout(10) << __func__ << " marking pg " << pgid
3880-
<< " stale (acting_primary " << newstat->acting_primary
3881-
<< ")" << dendl;
3882-
newstat->state |= PG_STATE_PEERING;
3883-
newstat->last_peered = ceph_clock_now();
3884-
}
3885-
38863860
}
38873861

38883862
void PGMapUpdater::check_down_pgs(

0 commit comments

Comments
 (0)