Skip to content
Permalink
Browse files

Merge pull request #14391 from LiumxNL/wip-170407

mon/PGMonitor: fix wrongly report "pg stuck in inactive"

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information...
liewegas committed Apr 28, 2017
2 parents 2944c48 + 77b0ff4 commit e9fb6a06e014b07500cf324c45e0c4317986d002
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/mon/PGMap.cc
@@ -539,6 +539,13 @@ void PGMap::stat_pg_update(const pg_t pgid, pg_stat_t& s,
s.blocked_by == n.blocked_by;

stat_pg_sub(pgid, s, sameosds);

// if acting_primary has shift to an just restored osd, and pg yet to finish
// peering, many attributes in current stats remain stale. others seem don't
// mater much while faulty last_active will make "pg stuck in" check unhappy.
if (!(n.state & (PG_STATE_ACTIVE | PG_STATE_PEERED)) &&
n.last_active < s.last_active)
n.last_active = s.last_active;
s = n;
stat_pg_add(pgid, n, sameosds);
}

0 comments on commit e9fb6a0

Please sign in to comment.
You can’t perform that action at this time.