Project

General

Profile

Bug #51688

"stuck peering for" warning is misleading

Added by Dan van der Ster over 1 year ago. Updated about 1 month ago.

Status:
Fix Under Review
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When OSDs restart or crush maps change it is common to see a HEALTH_WARN claiming that PGs have been stuck peering since awhile, even though they were active just seconds ago.
It would be preferable if we only report PG_AVAILABILITY issues if they really are stuck peering longer than 60s.

E.g.

HEALTH_WARN Reduced data availability: 50 pgs peering
PG_AVAILABILITY Reduced data availability: 50 pgs peering
    pg 3.7df is stuck peering for 792.178587, current state remapped+peering, last acting [100,113,352]
    pg 3.8ae is stuck peering for 280.567053, current state remapped+peering, last acting [226,345,350]
    pg 3.c0b is stuck peering for 1018.081127, current state remapped+peering, last acting [62,246,249]
    pg 3.fc9 is stuck peering for 65.799756, current state remapped+peering, last acting [123,447,351]
    pg 4.c is stuck peering for 208.471034, current state remapped+peering, last acting [123,501,247]
...

(Related: I proposed to change PG_AVAILABILITY issues to HEALTH_ERR at https://tracker.ceph.com/issues/23565 and https://github.com/ceph/ceph/pull/42192, so this needs to be fixed before merging that.)

I tracked this to `PGMap::get_health_checks` which will mark a PG as stuck peering if now - last_peered > mon_pg_stuck_threshold.
But the problem is that last_peered is only updated if there is IO on a PG -- an OSD doesn't send pgstats if it is idle.
To fix, we could update last_active/last_peered etc, and send a pg stats update more frequently even when idle?

Clearly osd_pg_stat_report_interval_max is related here, but the default is 500 and we have some PGs reported stuck peering longer than 500s, so there is still something missing here.

We observe this in nautilus, but the code hasn't changed much in master AFAICT.

History

#1 Updated by Dan van der Ster over 1 year ago

  • Subject changed from stuck peering since warning is misleading to "stuck peering for" warning is misleading

#2 Updated by Laura Flores 8 months ago

  • Tags set to low-hanging-fruit

#3 Updated by Laura Flores 8 months ago

  • Tags set to low-hanging-fruit
  • Tags deleted (low-hanging-fruit)

#4 Updated by Laura Flores 6 months ago

The relevant code would be in `src/mon/PGMap.cc` and `src/mon/PGMap.h`.

#5 Updated by Laura Flores 6 months ago

Peering PGs can be simulated in a vstart cluster by marking an OSD down with `./bin/ceph osd down <id>`.

#6 Updated by Laura Flores 6 months ago

Shreyansh Sancheti is working on this bug.

#7 Updated by Laura Flores 6 months ago

  • Status changed from New to In Progress

#8 Updated by Vikhyat Umrao 6 months ago

  • Assignee set to Shreyansh Sancheti

#9 Updated by Laura Flores about 2 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 49332

#10 Updated by Radoslaw Zarzynski about 1 month ago

Bump up! Need to decide on the needs-test.

Also available in: Atom PDF